Unable to delete Teams app permissions policy

%3CLINGO-SUB%20id%3D%22lingo-sub-1642786%22%20slang%3D%22en-US%22%3EUnable%20to%20delete%20Teams%20app%20permissions%20policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1642786%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20an%20app%20permissions%20policy%20in%20Teams%20so%20we%20can%20test%20out%20some%20add-in%20apps%2C%20we%20are%20unable%20to%20delete%20the%20policy%20because%20it%20is%20impossible%20to%20delete%20without%20first%20going%20through%20each%20user%20is%20has%20been%20assigned%20to%20and%20setting%20them%20back%20to%20the%20org-wide%20default%20policy.%20Unhelpfully%2C%20Teams%20does%20not%20show%20you%20which%20users%20the%20policies%20have%20been%20assigned%20to.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20how%20to%20show%20which%20users%20have%20been%20assigned%20an%20app%20permission%20policy%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20certain%20that%20we%20used%20to%20be%20able%20to%20delete%20policies%20and%20any%20users%20they%20were%20assigned%20to%20would%20be%20automatically%20reverted%20back%20to%20the%20org-wide%20default%20policy.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1642786%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1643116%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20Teams%20app%20permissions%20policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1643116%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20simply%20use%20PowerShell%20to%20switch%20policies%20and%20delete%20the%20one%20you%20need%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1939584%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20Teams%20app%20permissions%20policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1939584%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%20but...%3C%2FP%3E%3CP%3EI%20have%20a%20similar%20case.%26nbsp%3B%20We%20have%20a%20custom%20policy%20that%20..%20as%20far%20as%20I%20can%20tell...%20has%20no%20members.%26nbsp%3B%20But%20we%20can't%20delete%20it%20because%2C%20according%20to%20Teams%2C%20it%20does.%26nbsp%3B%20%26nbsp%3B%20So%20we%20need%20to%20re-assign%20the%20policy%20to%20all%20the%20current%20members%20of%20the%20policy.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEven%20this%20command%20requires%20that%20we%20know%20who%20to%20apply%20it%20to%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fteams%2Fget-csuserpolicyassignment%3Fview%3Dteams-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fteams%2Fget-csuserpolicyassignment%3Fview%3Dteams-ps%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20is%20there%20a%20way%20to%20get%20a%20list%20of%20everyone%20assigned%20to%20policy%20X%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

We have an app permissions policy in Teams so we can test out some add-in apps, we are unable to delete the policy because it is impossible to delete without first going through each user is has been assigned to and setting them back to the org-wide default policy. Unhelpfully, Teams does not show you which users the policies have been assigned to.

 

Does anyone know how to show which users have been assigned an app permission policy?

 

I am certain that we used to be able to delete policies and any users they were assigned to would be automatically reverted back to the org-wide default policy.

 

Many thanks

3 Replies

You can simply use PowerShell to switch policies and delete the one you need?

@Vasil Michev 

Yes but...

I have a similar case.  We have a custom policy that .. as far as I can tell... has no members.  But we can't delete it because, according to Teams, it does.    So we need to re-assign the policy to all the current members of the policy.

 

Even this command requires that we know who to apply it to: https://docs.microsoft.com/en-us/powershell/module/teams/get-csuserpolicyassignment?view=teams-ps

 

So is there a way to get a list of everyone assigned to policy X?

@PhilC42  & @Michael Davis  I have used the following to get all users with a specific app permission policy assigned 

 

 

Get-CsOnlineUser -Filter {TeamsAppPermissionPolicy -eq 'Policy Name Here'} | Select UserPrincipalName

 

 

Then you can assign another policy for those users and delete the old one.

 

Now if only someone could tell me how to remove the deleted user from the other policy I want to remove :)