Orphaned users in AzureAD/O365 showing up in org chart
Issue: How to remove orphaned users at O365 that are still showing up in active users' org charts.
How Orphaned Objects Occur:
There are two main ways this happens.
Hard-Deleted Mailbox.
The current by-design behavior when you purge mailbox user:
- User account in AzureAD is deleted with
remove-msoluser
- User account in EXO is moved to the Soft-Deleted users container
- The mailbox is disconnected, will remain this way for 30 days.
- User account in AzureAD is purged with
remove-msoluser -removefromrecyclebin
- User account in EXO has its externalDirectoryObjectID cleared
- The mailbox remains disconnected, still for 30 days from the date that step #2 occurred.
The mailbox will return with the get-mailbox -softdeletedMailbox
commandlet until it is permanently deleted by the system after 30 days, or until it is permanently deleted by the Administrator.
Inactive Mailboxes
A mailbox that is on LitigationHold or InPlaceHold, when it is deleted will be placed in a soft-deleted state and remain there until the hold is removed and the mailbox is manually purged by the Administrator.
Hard Deleted MailUser
The current by-design behavior when you purge mailuser:
- User account in AzureAD is deleted with
remove-msoluser
- User account in EXO is moved to the Soft-Deleted container
- It will remain this way for 30 days.
- User account in AzureAD is purged with
remove-msoluser -removefromrecyclebin
- User account in EXO has its externalDirectoryObjectID cleared
- It continues to remain this way for 30 days from the date that step #2 occurred
This is the same design that applies to mailboxes. The only difference is that the mailuser cannot be manually purged, there is no PowerShell command available to accomplish this. The customer must wait 30 days for the system to clear the account.
Related Articles
Presence not showing in Outlook
Issue: User presence is not shown in Outlook and other Microsoft 365 applications once the user is moved to the TeamsOnly mode. Solution: Reconfigure Teams to show user presence, using the following steps. Step 1: Launch Microsoft Teams and click on ...
Reset passwords in Microsoft 365
When a user requests a new password, you'll receive a password reset request in email. To reset the password, open the app launcher and select Admin. In the Microsoft 365 admin center, select Users, Active users, and then select the key icon next to ...
Error exporting Content Search results.
Issue: “Client Error 500” when try to export the results to a PST. Solutions: Clear browser cache: Sometimes, browser cache and cookies can cause issues. Try clearing your browser's cache and cookies and attempt the export again. Try a different ...
Name change not updating Teams
Issue: Name changes are not reflecting in Microsoft Teams. Solutions: Check Azure AD Sync: Ensure that Azure AD Connect (or any other sync tool you might be using) is running without any errors and that the sync cycle has completed successfully. This ...
Issues with syncing outlook
Issue: mailbox is not accessible from new Outlook on Mac and Outlook on IOS. Solution: Add a shared mailbox to Outlook mobile and Set up email with Outlook for iOS. To access a shared mailbox on a mobile device, use the following steps. 1. Sign in to ...