IT Error Decoder

How to Fix User not found

Error message

User not found / Resource not found for the segment 'users'.

If you're seeing "User not found", you're not alone. Here's what it means, why it happens, and the steps to resolve it.

What this error means

Entra ID / Microsoft Graph could not locate a user with the identifier you supplied in the tenant you're connected to.

Why this happens

The UPN/object ID is wrong, the user has been deleted, you're connected to the wrong tenant, or the user is a guest whose UPN differs from their email.

Step-by-step fix

  1. Confirm the active tenant.

    command
    (Get-MgContext).TenantId
  2. Search by display name or mail to discover the actual UPN.

    command
    Get-MgUser -Filter "startswith(displayName,'Jane')" -ConsistencyLevel eventual -CountVariable c
  3. If the user was recently deleted, look in the recycle bin.

    command
    Get-MgDirectoryDeletedItemAsUser -DirectoryObjectId <id>

Affected products

Entra ID

Still broken? Try these

  • For B2B guests, the UPN often looks like `name_contoso.com#EXT#@yourtenant.onmicrosoft.com`.
  • Try the lookup in Graph Explorer using the same account.
  • Re-check for typos and trailing whitespace in the input.

Related errors

Frequently asked questions

What does "User not found" mean?

Entra ID / Microsoft Graph could not locate a user with the identifier you supplied in the tenant you're connected to.

What causes "User not found"?

The UPN/object ID is wrong, the user has been deleted, you're connected to the wrong tenant, or the user is a guest whose UPN differs from their email.

How do I fix "User not found"?

1. Confirm the active tenant. 2. Search by display name or mail to discover the actual UPN. 3. If the user was recently deleted, look in the recycle bin. Always test changes in a non-production environment first.

Browse more errors in Entra ID: Fix Microsoft Entra ID (Azure AD) errors. AADSTS error codes, admin consent, app role assignment, Conditional Access, and user lookup problems. Or paste your own error into the error decoder tool to find a match. You can also go back to the homepage to browse common errors by topic.