So what is a Microsoft Team ID & why do you care? A TeamID is a unique identifier(UID) related to a specific team within Microsoft Teams. The reason that this so important is because most of the administrative actions you will use to automate, script, or provision will utilize this value. See the three examples provided below:
- PowerAutomate: When utilizing the PowerAutomate Microsoft Teams connectors you are required to provide a Team ID for nearly every action.
- Graph API: When querying or posting actions with the Graph API the Team ID is required for nearly all actions.
- PowerShell: When running PowerShell cmdlets associated with Microsoft Teams the Team ID is required.
So how can you find a Team ID? I use the following three methods typically to find a Team ID depending on the specific action or goal of what I am working on.
Microsoft Teams – Finding Team ID (Time: 1-2 Minutes)
From within Microsoft Teams, navigate to the Team and click on the ellipsis to the right of the team name.
Once clicked you will be presented with a number of options (Shown Below), click on Get Link to Team, click copy, and paste the copied value into a text editor.
This URL contains 3 pieces of information. The first is the Channel ID this begins with the 19% or 19:, the second is the GroupID which is associated with the Team, and the Third is the Tenant ID associated with your environment/organization. For our purposes today, remove everything shown in red as shown in the screenshot. The value you are left with is your Team ID.
PowerAutomate – Finding Team ID (Time: 2-5 Minutes)
From within PowerAutomate, create an instant flow including all the steps outlined in the screenshot below. This will provide you with a variable that outputs the TeamID for the specific team you are looking for.
Open a PowerShell window as administrator, run the cmdlet Connect-MicrosoftTeams, and provide your credentials for authentication purposes.
Next enter the cmd “Get-Team -DisplayName “TEAM NAME HERE”, this will return you with the Group/Team ID as well as other pertinent details regarding your team.
I hope this quick breakdown on how to locate a specific Team ID using 3 different approaches benefits you all, as always if you have questions feel free to reach out via LinkedIn or twitter https://twitter.com/soi2dev.com. Until next time stay safe!
About the Author:
Senior Solutions Architect at Perficient in Power Platform & Office 365
Barber, C. (2020). 3 Ways to Locate a Microsoft Team ID. Available at: https://www.linkedin.com/pulse/3-ways-locate-microsoft-team-id-christopher-barber-/ [Accessed: 24th November 2020].