大网数据广告活动
域与目录服务

Object deletions aren't synchronized to Microsoft Entra ID when using the Microsoft Entra ID Connect

· 52CE 我爱测

Describes an issue in which a deleted on-premises Active Directory object isn't removed from Microsoft Entra ID when directory synchronization is used in Office 365, Azure, or Microsoft Intune.

Summary

This article provides guidance on resolving an issue in which a deleted on-premises Active Directory object isn't removed from Microsoft Entra ID when directory synchronization is used in Office 365, Azure, or Microsoft Intune.

Original product version:   Cloud Services (Web roles/Worker roles), Microsoft Entra ID, Microsoft Intune, Azure Backup, Office 365 Identity Management
Original KB number:   2709902

Symptoms

Consider the following scenario:

  • You have an on-premises Active Directory object.
  • Directory synchronization is used to sync the Active Directory object to Microsoft Entra ID. It creates a linked object.
  • You delete the on-premises Active Directory object.

In this scenario, the linked object isn't removed from Microsoft Entra ID.

Cause

This issue may occur if one of the following conditions is true:

  • Directory synchronization hasn't yet occurred.
  • Directory synchronization unexpectedly failed to delete a specific cloud object and results in an orphaned Microsoft Entra object.

Resolution

To fix this issue, follow these steps:

  1. Make sure that the Microsoft Graph PowerShell module and ADSyncTools PowerShell module are installed.

  2. Run the following ADSync command to force directory synchronization:

    Start-ADSyncSyncCycle -PolicyType Initial
    
  3. If sync is working correctly but the Active Directory object deletion is still not propagated to Microsoft Entra ID, manually remove the orphaned object. To do so, use one of the following Microsoft Graph PowerShell cmdlets:

    For example, to manually remove orphaned user ID john.smith@contoso.com that was originally created by using directory synchronization, you would run the following cmdlet:

    $user = Get-MgUser -Filter "userPrincipalName eq 'john.smith@contoso.com'"
    Remove-MgUser -UserId $user.id
    

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 10/19/2023
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。