Jump to content
  • entries
    142
  • comments
    0
  • views
    87461

Delete user from Office 365 Hybrid with DirSync


proximagr

5537 views

 Share

This post is bout Exchange/Office 365 Hybrid Deployments, when for some reason we need to completely delete a user account and mailbox from Office 365 in order to re-sync it.

 

First you need to exclude the user from DirSync

  1. Open the “Synchronization Service Manager” (cn be fount at “C:\Program Files\WindowsAzureActiveDirectorySync\SYNCBUS\Synchronization Service\UIShell\miisclient.exe”)
  2. Navigate to “Metaverse Search” and click on “Add Clause”
  3. Be sure that you choose Displayname as Attribute, and then configure your search
  4. Double click an entry, and open the tab connectors
  5. Activate the line with the “Active Directory Connector” Management Agent and click on “Disconnect…
  6. In the disconnect object accept question, choose “Disconnector (Default)” to remove the connector. Explicit Disconnector will lock the object to be a connector again.


You can then rerun your search, and the specific account will not be shown anymore. And after a sync, the object will also be removed from the azure Directory

 

Then you need to remove the user object from the Office 365 portal using the PowerShell

  1. Open PowerShell “Windows Azure Active Directory Module”
  2. $msolcred = get-credential
  3. connect-msolservice -credential $msolcred
  4. Get-MsolUser -ReturnDeletedUsers | FT UserP*,ObjectId
  5. Remove-MsolUser -ObjectId abc1234-12abc-123a-ab12-a12b3c4d5f6gah -RemoveFromRecycleBin -Force
  6. Get-MsolUser -ReturnDeletedUsers | Remove-MsolUser -RemoveFromRecycleBin -Force


Then at the next scheduled sync of te DirSync the user will be recreated. Also you can force the DirSync to creaate the user faster.

 


soure: http://www.e-apostolidis.gr/microsoft/delete-user-from-office-365-with-dirsync/

 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...