How do I translate an internal team id to team group id?

Jacob Linney 11 Reputation points

Hello, I'm working on building an application with the botbuilder framework and the microsoft graph API. I would like to be able to call the{group-id} set of endpoints when a user makes a request through my bot. However, I cannot find a way to get that group ID.

Using the TurnContext, I can get the internal team id via, but I cannot use this for the graph API as it is in the format of 19:***@thread.tacv2 instead of a GUID. How do I translate this to the teams GUID?

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
8,127 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,119 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jacob Linney 11 Reputation points

    Found the answer: TeamsInfo.getTeamChannels(turnContext); will yield an object with

        "id": "<internal-id>",  
       "aadGroupId": "<team-guid>"  
    2 people found this answer helpful.
    0 comments No comments

  2. Shivam Dhiman 5,861 Reputation points

    Hi @Jacob Linney

    The "19:***@thread.tacv2" Id which you are getting is channel Id.

    To get the teams in Microsoft Teams that the user is a direct member of you can use GET this Graph API. This API will give you ID of all teams that user is member of.

    If you want to list all the groups available in an organization, use GET this Graph API endpoint.

    Hope this helps.
    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.