Get-UnifiedGroup | Where-Object {$_.managedby -eq "ann.parker"}
and
Get-UnifiedGroup | Where-Object {$.managedby -eq "ann.parker" -and $.welcomemessageEnabled -ne "True"}
The above command will fulfil this requirement
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello Teams Master,
Iam looking for the script / Graph API to archive the MS teams groups who left the organization. i believe the below process have to follow to achieve this.
Could you please someone helped. i have a script to collect the list of MS Teams and their ownners , however am looking for someting below
Enter the user name to display the list belongs to : abc@cloudmonkeys.xyz
and the result should give the list of MS Teams groups who owned by the specific user "abc@cloudmonkeys.xyz"
and finally it groups should be archive set-teamarchivedstate.
Get-UnifiedGroup | Where-Object {$_.managedby -eq "ann.parker"}
and
Get-UnifiedGroup | Where-Object {$.managedby -eq "ann.parker" -and $.welcomemessageEnabled -ne "True"}
The above command will fulfil this requirement
Use this query to list all "owned" objects: https://learn.microsoft.com/en-us/graph/api/user-list-ownedobjects?view=graph-rest-1.0&tabs=http
To archive a Team: https://learn.microsoft.com/en-us/graph/api/team-archive?view=graph-rest-1.0&tabs=http
Hi @Alig69 ,
According your description, your issue is related to development, which we do not support. I found a blog shows the example of how to achieve Teams by using API for your reference:
https://www.c-sharpcorner.com/article/how-to-restore-ms-teams-using-graph-api-in-powershell/
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.