Dirsync – After Deleting User from Office365 the User will not sync again

I Deleted a user and mailbox form Office 365 Tenant in an Hybrid environment with Dirsync
I tried to Sync the same user again and it didn’t show up in my Office 365 Tenant.

So I did two things

1. Deleted the User from the recycle bin by running this command in the DirsyncConfig powershell :

Remove-MsolUser –UserPrincipalName “UserPrincipalName” -RemoveFromRecycleBin –Force

2.Delete all Exchange attributes from Adsiedit for that user

3.Search for the User in dirsync , delete it and run the sync again

To search and delete I did the following steps:

1. Create a new search In Dirsync console

  • Open miisclient

"C:\Program Files\Microsoft Online Directory Sync\SYNCBUS\Synchronization Service\UIShell\miisclient.exe"

  • Open the tab " Metaverse Search"
  • Create a new search scope to find the user – click on Add Clause

image

2. Delete the user from office365

  • Double click the user
  • Open the tab "Connectors" , Select the SourceAD connector and click "Disconnect"
  • Go to the Management Agents tab
  • Right click the "TargetWebService" connector and choose "Run
  • Select the Full Confirming Import" run profile and click ok.

image

image

  • After its finished choose the "Export" run profile
  • In the next Sync the user will be recreated in Office 365

Add license for the user and the mailbox will be created.

Good luck Smile

This entry was posted in Office365 and tagged . Bookmark the permalink.

Leave a Reply