Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, October 7, 2015 3:16 PM
By mistake, we sycned numerous used from AD to Office365. We need to delete them from Office365 but we cannot delete them from AD. What is the best approach? Can I do this with a script? Any help is appreciated.
All replies (2)
Thursday, October 8, 2015 3:22 AM
Hi fim_sc,
Based on your description, if your organization synchronizes user accounts to Office 365 from a local Active Directory environment, you must delete those user accounts in your local Active Directory service. You can’t delete or restore them in Office 365.
For more information about synchronizing user accounts to Active Directory please refer to this article.
https://technet.microsoft.com/en-us/library/ff637588.aspx
About how to delete user accounts from AD please refer to this article:
https://technet.microsoft.com/en-us/library/cc779035(v=ws.10).aspx
Hope it's helpful.
Regards,
Emi Zhang
TechNet Community Support
Please mark the reply as an answer if you find it is helpful.
If you have feedback for TechNet Support, contact [email protected].
Thursday, October 8, 2015 1:44 PM
the user accounts are created via the azure ad connector that can be downloaded within office365 portal. I found these 2 commands that can delete users from office365. Is there any impact to this?
remove-msoluser –userprincipalname $username -force
remove-msoluser –userprincipalname $username -RemoveFromRecyclebin -force