Forum Discussion
Unable to delete Teams app permissions policy
Good script!
Just ran into this today. Not sure about PowerShell, but you can reassign the App permission policy from the Teams admin center under Users > Manage users. Search for the user then under the Policies tab find your App permission policy and change it to whatever you want and Save. Says it may take a few hours to update, but it was immediate for me.
This cmdlet looks promising, but I couldn't get it to work for me (or others) as it appears there are several issues with the Teams PowerShell cmdlets in general.
https://docs.microsoft.com/en-us/powershell/module/skype/grant-csteamsapppermissionpolicy?view=skype-ps
rgrimm for anyone googling this, you can now filter by policy in the Teams Admin Center under Manage users, and export the results into .csv. Makes finding users with a specific policy assigned much easier.
One issue you might run into is disabled users. The users may still show in the Teams admin center as having the policy you want to delete applied, but you can't remove the policy via the admin center or PowerShell. It can be a painful wait to re-enable users just so you can remove the policy and delete it.