Saturday, April 29, 2023

How to Bulk Unassign Teams Policy from user profiles

There are scenarios where you need to unassign the policies assigned to user profiles.


That's why Microsoft Teams has introduced a new feature called Bulk Unassign Teams Policy. This feature allows you to unassign a specific Teams policy from multiple users in one go. You can use this feature to quickly and easily manage your Teams policies and ensure that your users have the appropriate settings and permissions for their roles.


Bulk Unassign Teams Policy is a useful and convenient feature that can help you save time and effort when managing your Teams policies. However, you should use it cautiously and ensure you understand the implications of unassigning a Teams policy from multiple users. 

  • Select Manage Users
  • Select "Unassign policies in bulk" under Action in the top right corner.


Unfortunately, at this time, the bulk unassign policy has certain limitations and does not provide support for all available policies. See the below list of supported policies.



In this example, I'm using an App setup policy. The Bulk Unassign Teams Policy feature will remove the selected Teams policy from the selected users and apply the global (Org-wide default) policy instead. 

Once you select the policy type, it will show you all the custom policies created.

Select the policy and click "Load data" under directly assigned users to see how many users were impacted.


Select the policy you want to unassign from user profiles and click "Unassign"


Click "Confirm"



You can check the status of the bulk unassignment operation in the Bulk assignment history page from the Home page.


The activity page will give more information about the bulk operation status.




You can also do this action through PowerShell as well.

Find how many users have specific custom policies assigned. Store the value of the variable.

$PolicyAssigned = Get-CsOnlineUser -ResultSize unlimited | Where-Object {$_.TeamsAppSetupPolicy -eq "App Custom Policy"}

Find the no.of users

$PolicyAssigned.Count

Unassign the Policy

Foreach ($User in $PolicyAssigned.Sipaddress){

Grant-CsAppSetupPolicy -Identity $User -PolicyName $Null

}



No comments:

Post a Comment