Forum Discussion

AtanasM's avatar
AtanasM
Iron Contributor
Apr 13, 2022
Solved

Delete alias from synced user in Admin Center

I cannot edit or remove an alias with onmicrosoft.com domain in the cloud, because the user is synced with the local Active Directory. The alias is not available in “Attribute Editor” in Active Directory for the user. Is there a way to remove this alias?
  • To disable dirsync:
    Set-MsolDirSyncEnabled -EnableDirSync $false

    Once it's disabled, remove the alias via the admin center or Powershell, then re-enable dirsync:

    Set-MsolDirSyncEnabled -EnableDirSync $true

8 Replies

  • You cannot, unless you disable dirsync/move the object outside of the sync scope. Another thing to keep in mind is that Office 365 enforces a policy requiring that at least one SMTP address matches the user's UPN (in other words if the domain part of the UPN is @tenant.onmicrosoft.com, you will not be able to remove the matching smtp address).
    • AtanasM's avatar
      AtanasM
      Iron Contributor
      The UPN is not with @tenant.onmicrosoft.com. If I move the user outside the sync, the cloud user will be soft deleted. How can I remove an alias from a deleted user?
      • Disable dirsync first, then move it outside of the sync scope, to prevent deletion.

Resources