Help me understand Bot Service User Ids for Teams

Phil Haack 66 Reputation points
2021-03-08T21:17:24.493+00:00

Hi, we're using Azure Bot Service and the Bot Framework SDK for C#. We noticed that the user IDs for Slack users are very different from MS Teams users. We don't understand what the components of the ID represent for Teams users.

For example, a slack user id with Azure Bot Service connected to Slack might look like: U112345:T1234567. The ID has two parts. The part before the : is their Slack User Id. The part after the : is the Id of the Slack Workspace (or Team).

With Microsoft Teams, the ID looks something like: 29:9a2e7BgFqeN2...UQpiXg. It looks like the left part is an integer and the right part is some sort of token string. What do these values represent?

Thanks!

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
742 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.
2,822 questions
{count} votes

Accepted answer
  1. YutongTie-MSFT 46,081 Reputation points
    2021-03-10T05:02:15.787+00:00

    Hi there,

    Depending on the channel vendor, the intent of the ids is intended to be opaque such that you can't draw inferences from the content of the id's. In the case of both Teams and Slack those companies have chosen to provide different ID's to each application such that no two bots could correllate the id's.

    In the case of Teams/Skype mechanically, 28/29 are sort of address spaces for id's (I think 28 might be Skype and 29 might be Teams, but it's more complex than that in practice. The best approach to identify the user is to have them log in with some sort of credentials (OAuth, AAD), and utilize that to determine who they are.

    Hope this helps.

    Regards,
    Yutong


0 additional answers

Sort by: Most helpful