Category Archives: Uncategorized

Unable to Delete Azure AD Connect Sync’d Groups

Issue

You have Active Directory groups being sync’d to Azure AD via Azure AD Connect.  These sync’d groups are being used for assigning licenses in your tenant.  If you delete one of these groups from your Active Directory, AD Connect throws an error and you get an error alert email.

The error says:

The cause of the error is not clear. This operation will be retried during the next synchronization. If the issue persists, contact Technical Support.

If you open the Azure AD Connect Synchronization Service, you can also see the error there:

AADConnectError

AAD Connect Error

If you try to delete the same group via PowerShell, you get the following error:

 

Remove-AzureADGroup : Error occurred while executing RemoveGroup.
Code: Request_BadRequest
Message: Group deletion is not allowed.

 

Cause

Azure AD blocks group deletion when the group is being used to assign licenses.  This is to help protect you from accidentally removing all of your users’ licenses with a single action.

Resolution

Remove the license assignment from the group and run the sync again.  You can kick off the sync from your AAD Connect Server by running:

Start-ADSyncSyncCycle -PolicyType:Delta

 

References:

Group Based Licensing: https://docs.microsoft.com/en-us/azure/active-directory/active-directory-licensing-group-assignment-azure-portal

Advertisements