How to create a teams chat with an external guest using logic apps

Gareth T 5 Reputation points
2025-01-17T09:11:18.0966667+00:00

I am trying to create a group chat that includes an external guest user using the Teams "Create a chat" logic app connector. I can create the chat if I only use an internal email address but not if I include the guest user. Is there any way to do this?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,313 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,485 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Khadeer Ali 2,360 Reputation points Microsoft Vendor
    2025-01-17T10:35:33.4766667+00:00

    @Gareth T ,
    Welcome to Microsoft Q&A Platform!

    Thank you for reaching out. I understand that you're trying to create a group chat in Teams that includes an external guest user using the Logic Apps connector. Unfortunately, the "Create a chat" action in Logic Apps currently does not support adding guest users to a group chat. This is a known limitation.
    https://learn.microsoft.com/en-us/connectors/teams/?tabs=text1%2Cdotnet

    However, we could try this functionality by leveraging the Microsoft Graph API. The Graph API provides the flexibility to include both internal users and external guests in a Teams group chat, provided the external users are already added as guests to your Azure Active Directory tenant.

    To implement this solution:

    1. The guest user must first be invited and properly configured in your Azure AD.
    2. We can utilize Logic Apps' HTTP action to call the Graph API and programmatically create a group chat, including the external guest.

    https://learn.microsoft.com/en-us/graph/api/chat-post?view=graph-rest-1.0&tabs=http

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

  2. Prasad-MSFT 7,796 Reputation points Microsoft Vendor
    2025-01-17T11:08:11.13+00:00

    According to documentation, there are known issues and limitations with actions, including the inability to add guest users to group chats using the "Create a chat" action. This limitation means that while you can create group chats with internal users, adding external guest users is not supported through this specific connector.

    Thanks, 

    Prasad Das

    ************************************************************************* 

    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    0 comments No comments

  3. Gareth T 5 Reputation points
    2025-01-17T13:42:13.5133333+00:00

    I have found that it can be done if you use the user id instead of the email address.

    So I first get the user profile using their internal email address as the UPN e.g. extrernalemail_gmail.com#ext#@mycompany.onmicrosoft.com. This returns the ID and ID can be used when creating the chat.

    0 comments No comments

  4. Khadeer Ali 2,360 Reputation points Microsoft Vendor
    2025-01-17T13:49:17.3033333+00:00

    @Gareth T ,

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others" I'll repost your solution in case you'd like to accept the answer.

    Issue:

    You were trying to create a group chat in Teams that includes an external guest user using the Logic Apps connector. Initially, it seemed that the "Create a chat" action in Logic Apps did not support adding guest users to a group chat.

    Solution:

    You found that it can be done if you use the user ID instead of the email address. Here’s how you resolved it:

    • First, get the user profile using their internal email address as the UPN (e.g., extrernalemail_gmail.com#ext#@mycompany.onmicrosoft.com). This returns the ID.
    • Use the returned ID when creating the chat.

    If I missed anything, please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    I hope this helps!

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.