Forum Discussion

kwo's avatar
kwo
Copper Contributor
Oct 22, 2025

AZURE AD Contacts problem

Heloo,

I've been looking for an online solution and nothing works. I have a hybrid Active Directory on-premise and Azure AD system since 2021. Users created in Active directory on-premise deleted since 2021-2022 still appear in my Azure AD contacts, and when I synchronize the contacts from AzureAD with other applications, those users are also visible. The users no longer exist in AD, from there they are automatically deleted after 180 days anyway, I checked. They are no longer found in Azure AD, M365 Admin, the only place where they are still found is Azure AD contacts, it seems they are not in the GAL either because they do not appear in outlook.
- I tried Online PowerShell - Get-User | Format-List DisplayName, UserPrincipalName, PrimarySmtpAddress , It only shows me active users
- I tried Microsoft Graph , ditto, it only shows me active users.
I don't know how to identify those users, and their number is increasing.

Please help, some other Ideas?

1 Reply

  • hi kwo​  This is a known situation that can occur in hybrid environments where contact objects (typically Mail Contacts) get orphaned in Microsoft Entra ID (formerly Azure AD) after user deletions in on-premises AD. These orphaned objects often remain under Contacts because they were originally synced via Exchange attributes, not directly through the user object itself.

    Here are some steps you can try to resolve it:

    a.Check if they’re actually “Contact” objects in Entra ID

    Run this in Microsoft Graph PowerShell:

    Get-MgContact | Select-Object DisplayName, Mail, Id

    If they appear here, it means they exist as contact-type objects, not users.

    b.Clean up orphaned contacts manually

    If confirmed, you can delete them with:

    Get-MgContact | Where-Object {$_.Mail -like "*@yourdomain.com"} | Remove-MgContact

    (Use filters carefully — test with -WhatIf first!)

    c.Check Exchange Online for mail contacts

    Sometimes, these are actually Mail Contacts synced via Exchange Online Directory.
    Run:

    Get-MailContact | Select DisplayName, ExternalEmailAddress

    If they appear here, remove them with:

    Remove-MailContact -Identity "DisplayName"

    d.Run a Full DirSync / Entra Connect sync cycle

    Force a sync to ensure the deletions replicate properly:

    Start-ADSyncSyncCycle -PolicyType Initial

    e.If still stuck

    It could be an issue with Exchange Online Directory sync caching. In such cases:

    Open a Microsoft 365 Admin Support ticket

    Ask them to check for stale “DirSync: Contact” objects and perform a backend cleanup.

     

Resources