How can a add a microsoft Teams user to a chat using a communication service, when I only know his Teams user name

Timon Schmidt 31 Reputation points
2022-03-22T09:07:28.37+00:00

When we want to add participant to a communication service this user needs an access token and and an id. I can do this using the CommunicationUserIdentifier to create token and id.

Based on this CommunicationUserIdentifier I than can initialize a ChatParticipant object, which I can add to a chat thread.

However, what do I have to do in case I need to add user from MS Teams? How can I associate the Teams User to a Chat User to make sure the Teams user does recieve messages in MS Teams directly? I couldn't find any information on this in the documentation of the Communication Service.

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,242 questions
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2022-03-24T05:33:06.737+00:00

    Thanks for asking question! When adding Teams users to a chat thread, Graph API can be used to search by user name to get the user object ID which is what is needed.

    Also, You may want to know that the ability to use ACS to chat with a Teams user is currently only available in limited private preview.

    You can submit this form to request participation in the preview and we will review your scenario(s) and evaluate your participation in the preview.

    Note: Private Preview APIs and SDKs are provided without a service-level agreement, and are not appropriate for production workloads and should only be used with test users and test data. Certain features might not be supported or might have constrained capabilities.

    For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

    Recommended document : Teams calling and chat interoperability - An Azure Communication Services concept document | Microsoft Learn

    Let us know if further query or issue remains.


0 additional answers

Sort by: Most helpful

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.