How to get the Teams User Id for Teams Interop Using Azure Communication Services

asked 2022-12-23T08:44:52.017+00:00
Sarphu Rongpi 1 Reputation point

I am trying to join a Teams Call using Microsoft Teams Interop with an authorized Microsoft OAuth User.
I've manage to retrieve the Azure Communication Services access token following this post. However, I am not able to retrieve an Azure Communication Services User Id.

I am testing the credentials on the following page.
https://azure.github.io/communication-ui-library/?path=/story/composites-call-with-chat-basicexample--basic-example
273675-image.png

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
5,265 questions
Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
313 questions
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2022-12-23T12:01:52.41+00:00
    Ebraheem Al-Muneyeer (MSFT) 776 Reputation points Microsoft Employee

    Hey @Sarphu Rongpi , thank you for reaching out.

    The application that you are testing Call with Chat Composite is not Teams interop and it is not designed to be used with exchanged Teams tokens.

    Can you please try to run our sample application get-started-with-voice-video-calling-custom-teams-client locally?

    That said, you can try the below to get the user ID but I'm not sure if it will work or not:

    1. Copy the ACS access token you have
    2. Decode the JWT access token with any JWT decoder. For example JWT.MS
    3. Copy skypeID and use it as user ID.
      273761-image.png

    Again, this might not work as the sample is not built to be used with exchanged tokens and your best shot will be to run the sample mentioned above locally.