Forum Discussion
Ethan Stern
Mar 04, 2020Iron Contributor
Powershell script to find out Teams policies by users
Hey everyone, do you know if there is a way to run a script to find what Teams policies are assigned to what user? We have a private channel policy in place- I would like to find out a list of users...
NikkiChapple_
Oct 18, 2021Iron Contributor
The filter only works is the polices have been directly assigned. If the user inherits a policy from being in a group then they do not show up in the results
SebCerazy
Feb 21, 2023Iron Contributor
Get-CsUserPolicyAssignment : Cannot bind argument to parameter 'Identity' because it is an empty string.
At C:\PSScripts\teams_assigned-policies.ps1:17 char:58
+ ... $UserPolicies = Get-CsUserPolicyAssignment -Identity $User.ObjectId
+ ~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-CsUserPolicyAssignment], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Get-CsUserPolicyAssignment
Also no data is presented in csv at all for any user (all users have the policies assigned by group membership)