Microsoft Exchange Online
A Microsoft email and calendaring hosted service.
1,955 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
I have created the following policy using the syntax below. I assigned this policy to a couple of users, but I am unable to delete it because it is still assigned to some users. How can I remove the users from this policy and delete the policy? Please guide me, as I am encountering an error while trying to delete the policy.
New-CsApplicationAccessPolicy -identity Policy1 -AppIds "clientid"
Grant-CsApplicationAccessPolicy -PolicyName Policy1 -Identity "user-objectid1"
Remove-CsApplicationAccessPolicy "Policy1"
Remove-CsApplicationAccessPolicy : The policy "Policy1" is currently assigned to one or more users or groups. Ensure policy is not assigned before removing.
Remove the policy from the user(s) before trying to remove the policy itself.
Grant-CsApplicationAccessPolicy -Identity "UserIdentity" -PolicyName $Null