Others

Fix an OnPremiseSecurityIdentifier Conflict in Azure AD Connect

Jason MillerJason Miller Nov 18, 2026 868 views

Question details

Resolve a duplicate OnPremiseSecurityIdentifier conflict and determine why the synchronized Microsoft 365 account remains after the user is moved out of scope.

Fix an OnPremiseSecurityIdentifier Conflict in Azure AD Connect
Product
Azure AD Connect (Microsoft Entra Connect Sync)
Device & OS
not provided
Scenario
A user was restored from backup and Azure AD Connect was reinstalled. The user was then moved to an organizational unit excluded from synchronization.
Observed behavior
The synchronization trace reports a duplicate OnPremiseSecurityIdentifier, and the synchronized Microsoft 365 account remains present.
Before you start

Identify the affected on-premises user, the conflicting cloud account, and any Exchange mail user associated with the identity. Have an administrator with access to the sync server, Active Directory, and Exchange review the synchronization errors and recipient configuration.

Solution 1Recommended

Check the on-premises Exchange mail user and resolve the conflict

Use this approach if the affected identity has an on-premises Exchange mail user that may be contributing to the duplicate identifier conflict.

In the reported case, removing the local mail user, synchronizing, and then recreating the user and mail user resolved the conflict. The cause may differ in another environment, so confirm the affected objects before making changes.

1
Inspect the synchronization error

On the sync server, open Synchronization Service Manager and review the Operations tab for the failed run. Open the error details to identify the objects involved in the duplicate OnPremiseSecurityIdentifier.

2
Check the Exchange recipient

In the on-premises Exchange Management Shell, run Get-MailUser -Identity "user@example.com" using the affected identity. Confirm that the returned mail user is the recipient associated with the conflict.

3
Plan the recipient change

Review the mail user's properties in Exchange Management Shell, including its external email address and proxy addresses, and coordinate with the Exchange administrator before changing or removing it.

4
Remove the mail-enabled configuration if appropriate

If the administrator confirms this is the affected mail user and approves the change, use Disable-MailUser -Identity "user@example.com" in Exchange Management Shell to remove its Exchange mail-enabled attributes while retaining the Active Directory user.

5
Synchronize and reassess

On the sync server, run Start-ADSyncSyncCycle -PolicyType Delta in PowerShell, then check Synchronization Service Manager for the result. If the user still needs to be mail-enabled, have the Exchange administrator use Enable-MailUser with the appropriate external email address and restore the required recipient settings.

Check the on-premises Exchange mail user and resolve the conflict
Avoid deleting the Active Directory user unnecessarily: Disabling a mail user removes Exchange attributes; deleting or recreating the underlying user can affect its SID, permissions, and cloud identity. Recreate the user only after an administrator has assessed those consequences.
Free Microsoft Office alternative

Document Azure AD Connect troubleshooting in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface and compatibility with Microsoft Office formats, making it easy to move troubleshooting notes and reports between suites. It does not fix Azure AD Connect or replace directory synchronization.

Record synchronization errors and remediation steps in documents or spreadsheetsOpen and edit common Microsoft Office formats, including DOCX and XLSXUse a familiar interface for an easier transition from Microsoft OfficeWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why is the cloud user still present after I moved it to an excluded OU?

The change may not have been processed or exported, or a deletion safeguard may have stopped it. Check OU filtering in Microsoft Entra Connect and review recent operations in Synchronization Service Manager.

How can I check whether the user is an on-premises Exchange mail user?

In the on-premises Exchange Management Shell, run Get-MailUser -Identity "user@example.com" with the affected user's identity. Verify the returned recipient before making changes.

Does disabling a mail user delete the Active Directory account?

Disable-MailUser removes the user's Exchange mail-enabled attributes but retains the underlying Active Directory user. Review the recipient settings and effects with an Exchange administrator first.

How do I start a synchronization cycle after correcting the issue?

On the Microsoft Entra Connect sync server, run Start-ADSyncSyncCycle -PolicyType Delta in PowerShell. Then review the Operations tab in Synchronization Service Manager for errors and export results.