Another SharePoint Online Report - Get Teams Information
Problem
SharePoint Administration can be very complex when sites/users are growing without any governance. Let us take the example of a case of seeing the users in Microsoft Teams.
Solution
Microsoft has released commands that let you see details in one line for MS Teams. The one line command of Teams shows various details.
- User ID
- User
- Role
- GroupID
- GroupName
Below are sample commands.Get-Team gets the teams that a user belongs to and Get-TeamUser lists the users in a Group with Group ID.
Install-Module -Name MicrosoftTeams
Connect-MicrosoftTeams
Get-Team -User "admin@yourdomain.onmicrosoft.com"
To view the members of a Group, you can use Get-TeamUser.Microsoft Graph can be very helpful to get GroupID. Login to https://developer.microsoft.com/en-us/graph/graph-explorer and login with your tenant id
https://graph.microsoft.com/v1.0/groups
Type above query and View results and get ID of your group Get-TeamUser -GroupId 3aaa4cf-ccc7-4408-554d-d58accdb6661
You can view sample Business Applications in MS Graph from my recent talk here.
To get Top 10 commonly used PowerShell commands for SharePoint On Premise, get eBook here. If new to SharePoint/PowerShell, check out the free eBooks from here.To schedule free 1 hour appointment related to above report or get a Technical talk, click here or email thangutinyusefultools@gmail.com.
Comments
Post a Comment