Posts

Showing posts from May, 2022

Microsft Teams Homebrew - Get-TeamsEffectiveUserPolicy -Identity -Policy

There is an ever increasing number of policies that can apply to users in Microsoft Teams. There's also different ways to apply them. When queried outside of Teams Admin Center (TAC) its not immediately clear what has been assigned. Get-CsOnlineUser might return a blank - thats because its not assigned (Global).  Thats all well and good but it doesn't tell me if a policy has been assigned by group. To find this out you need to write a few more lines of powershell. I decide to wrap it up as a function and have this minimum viable product. No doubt it will need some tweaking as we go along, but for the moment, it seems to work. Call the function with one of the applicable policies and it will return [Global], [D] (direct) or [G] (group) with the policy name. It's straight forward enough - checks to see if there is a policy assignment. If so, it checks if theres a direct assignment, and if not, checks the ranking of the group assignments. Simple enough and makes for a simple f