How to show assigned (Teams) policies per user with PowerShell?

%3CLINGO-SUB%20id%3D%22lingo-sub-1241282%22%20slang%3D%22en-US%22%3EHow%20to%20show%20assigned%20(Teams)%20policies%20per%20user%20with%20PowerShell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1241282%22%20slang%3D%22en-US%22%3E%3CP%3EDue%20to%20the%20Teams%20Admin%20Center%20having%20some%20performance%20issues%2C%20i%20used%20PowerShell%20to%20create%20and%20assign%20a%20specific%20policy%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENew-CsTeamsMeetingPolicy%20-Identity%20%22No%20Lobby%22%20-AutoAdmittedUsers%20Everyone%3CBR%20%2F%3EGrant-CsTeamsMeetingPolicy%20-PolicyName%20%22No%20Lobby%22%20-Identity%20%22someuser%40somedomain.com%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20i%20seem%20not%20to%20find%20a%20PowerShell%20cmdlet%20that%20gives%20me%20the%20list%20of%20assigned%2Factive%20policies%20per%20user.%20How%20would%20this%20be%20possible%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20see%20this%20in%20the%20Admin%20Portal%20under%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fadmin.teams.microsoft.com%2Fusers%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fadmin.teams.microsoft.com%2Fusers%3C%2FA%3E%26nbsp%3Band%20then%20dive%20into%20each%20user%20and%20check%20there.%20But%20a%20PowerShell%20cmdlet%20would%20be%20nice%2C%20especially%20if%20the%20Admin%20portal%20is%20slow'ish...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20a%20pointer.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDan%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1241282%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdministrator%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETips%20%26amp%3B%20Tricks%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1241407%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20show%20assigned%20(Teams)%20policies%20per%20user%20with%20PowerShell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1241407%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3BIn%20the%20meantime%2C%20I%20found%20this%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EGet-CsOnlineUser%20-Filter%20%7BTeamsMeetingPolicy%20-eq%20'No%20Lobby'%7D%20%0A%20%7C%20Select%20UserPrincipalName%2C%20TeamsMeetingPolicy%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThis%20would%20give%20me%20each%20user%20that%20this%20policy%20is%20applied.%20But%20I%20would%20have%20to%20know%20the%20policy%20name%20beforehand.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EGet-CsOnlineUser%20-identity%20someuser%20%7C%20Select%20*Teams*Policy*%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%20would%20expect%20that%20this%20would%20get%20me%20all%20Teams%20related%20policies%20for%20the%20user%20%22someuser%22.%20However%2C%20the%20default%20policies%20are%20missing....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2246879%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20show%20assigned%20(Teams)%20policies%20per%20user%20with%20PowerShell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2246879%22%20slang%3D%22en-US%22%3EYou%20can%20run%20the%20following%20without%20any%20parameters%20to%20show%20all%20policies%20created%20in%20the%20tenant%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fskype%2Fget-csteamsmeetingpolicy%3Fview%3Dskype-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fskype%2Fget-csteamsmeetingpolicy%3Fview%3Dskype-ps%3C%2FA%3E%3C%2FLINGO-BODY%3E
Contributor

Due to the Teams Admin Center having some performance issues, i used PowerShell to create and assign a specific policy:

 

New-CsTeamsMeetingPolicy -Identity "No Lobby" -AutoAdmittedUsers Everyone
Grant-CsTeamsMeetingPolicy -PolicyName "No Lobby" -Identity "someuser@somedomain.com"

 

However, i seem not to find a PowerShell cmdlet that gives me the list of assigned/active policies per user. How would this be possible?

 

I can see this in the Admin Portal under https://admin.teams.microsoft.com/users and then dive into each user and check there. But a PowerShell cmdlet would be nice, especially if the Admin portal is slow'ish...

 

Thanks for a pointer.

 

Dan

 

 

 

2 Replies

 In the meantime, I found this:

Get-CsOnlineUser -Filter {TeamsMeetingPolicy -eq 'No Lobby'} 
 | Select UserPrincipalName, TeamsMeetingPolicy

This would give me each user that this policy is applied. But I would have to know the policy name beforehand.

Get-CsOnlineUser -identity someuser | Select *Teams*Policy*

I would expect that this would get me all Teams related policies for the user "someuser". However, the default policies are missing....

 

 

You can run the following without any parameters to show all policies created in the tenant:
https://docs.microsoft.com/en-us/powershell/module/skype/get-csteamsmeetingpolicy?view=skype-ps