Not able to delete user synced from Windows server using Azure AD Connect

I created a Windows server 2012 R2 VM in the Azure and I made it as Windows domain controller.

I created some users in the windows server lets say [email protected]

In the Azure portal I created a Custom domain lets say it as xyz.com which I purchased from godaddy.

I installed Azure AD Connect in the Windows server and synced the Window Server AD with Azure AD and Azure AD got the users from the windows Server

Now I deleted the Windows server VM.

Now when I try to delete the custom domain xyz.com the portal says I need to delete the user [email protected]

But I am not able to delete the [email protected] because the delete option is disabled.

Please help

Upvotes: 0

Views: 6646

Answers (1)

Sa Yang
Sa Yang

Reputation: 9401

CAUSE:

The on-premises AD DS is no longer available. Therefore, you can't manage or delete the object from the on-premises environment.

Solution:

  1. Install the Azure Active Directory Module for Windows PowerShell. For more info, go to the following Microsoft website:

Manage Azure AD using Windows PowerShell

  1. Connect to Azure AD by using Windows PowerShell.

  2. Disable directory synchronization. To do this, type the following cmdlet, and then press Enter:

    Set-MsolDirSyncEnabled –EnableDirSync $false

  3. Check that directory synchronization was fully disabled by using the Windows PowerShell. To do this, run the following cmdlet periodically:

    (Get-MSOLCompanyInformation).DirectorySynchronizationEnabled

    This cmdlet will return True or False. Continue to run this cmdlet periodically until it returns False, and then go to the next step.

Note It may take 72 hours for deactivation to be completed. The time depends on the number of objects that are in your cloud service subscription account.

  1. Try to remove/update an object by using Windows PowerShell or by using the portal.

See more details about this kind of case Official support article in this link.

Upvotes: 1

Related Questions