1. Resources
  2. Identity Threats
  3. Microsoft Entra ID

nOAuth (Mutable Email Claim Account Takeover)

Also known as: nOAuth, Email claim account takeover, Sign in with Microsoft account takeover, Unverified email claim abuse, Cross-tenant email spoofing

An attacker sets a victim's address as the mail attribute of a user in their own Entra tenant and signs in to a multitenant app that identifies accounts by the email claim, taking over the victim's account.

Platform
Microsoft Entra ID
Impact
High
Last updated
Attack difficulty
Low
Detection difficulty
High
Privileges required: No account
No access to the victim's tenant or account. The attacker needs their own Entra tenant, where they are an administrator, and the victim's email address.
What the attacker gains
A full session as the victim in every vulnerable application: their data, their settings and any administrative role their application account holds.

How it works

nOAuth is an account takeover in applications that offer "Sign in with Microsoft" to users from any organization. It was published by Descope on 20 June 2023, in a joint disclosure with Microsoft. The weakness is in the application, not in the victim's Entra ID tenant.

OpenID Connect identifies a signed-in user to a client with two values in the ID token: the issuer (iss) and the subject (sub). Together they are the identity key. Many applications ignore that and look up the local account by the email claim instead, because email is what every identity provider returns and what the account table is already keyed on.

In Entra ID the email claim is filled from the user's mail attribute. That attribute is mutable, and the directory does not check it: an administrator of any tenant can set a user's mail to an address in a domain the tenant has never verified. Microsoft's claim reference says the value is not guaranteed to be correct and must never be used for authorization.

Put together:

  1. The attacker creates an Entra tenant, which makes them its administrator.
  2. They set the mail attribute of a user in that tenant to the victim's address.
  3. They sign in to the vulnerable multitenant application with that user. Entra ID authenticates the attacker's own user correctly and issues a valid, correctly signed ID token whose email claim holds the victim's address.
  4. The application finds the victim's account by email and opens a session for it.

Every cryptographic check passes. The token is genuine; only its meaning was misread. This is the difference between authentication and authorization at the receiver: the issuer proved who signed in, and the application decided on its own which local account that maps to.

Two variants are worth separating:

  • Direct takeover. The application keys accounts on email for Microsoft sign-ins.
  • Account merging. The application, or the authentication service it uses, links a new Microsoft sign-in to an existing account with the same email, even one created with a password or another provider. The victim does not need to have ever used Microsoft sign-in.

The same principle covers the rest of token validation. A receiver that accepts tokens from many tenants, or from both personal and organizational accounts, decides for each request which issuer, signing key, audience and subject it accepts. Microsoft reported that in the 2023 Storm-0558 incident a validation error let tokens signed with a consumer key reach enterprise email. An application that takes the signature as sufficient and skips the issuer or tenant check makes a smaller version of the same mistake.

Prerequisites

  • A target application registered as multitenant (accounts in any organizational directory), so that it accepts sign-ins from the attacker's tenant.
  • The application identifies or merges accounts by the email claim, or by another mutable claim, instead of iss and sub or tid and oid.
  • The application still receives unverified email values. That is the case for applications excepted from Microsoft's default (multitenant applications with earlier sign-ins that used unverified emails) whose owners have not set removeUnverifiedEmailClaim.
  • The victim's email address, and an account for it in the application.
  • An Entra tenant the attacker administers. No access to the victim's tenant, device or mailbox.

Attack steps

For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.

1. Find a candidate application

Look for applications with a "Sign in with Microsoft" button that accept any work or school account, and whose sign-up flow shows the email address as the account identifier. Testing is done against an account the tester owns: create an account with one identity, then try to reach it with a second identity that only shares the email value.

2. Set the victim's address on a user in the attacker's tenant

Connect-MgGraph -TenantId "00000000-0000-0000-0000-000000000000" -Scopes "User.ReadWrite.All"

# A user in the attacker's own tenant. The mail value is not verified against any domain.
Update-MgUser -UserId "tester@attackertenant.onmicrosoft.com" -Mail "alice@corp.example.com"

Get-MgUser -UserId "tester@attackertenant.onmicrosoft.com" -Property Mail, UserPrincipalName |
    Select-Object Mail, UserPrincipalName

The same change can be made in the Microsoft Entra admin center, in the Email field of the user's contact information.

3. Sign in to the application with that user

Choose "Sign in with Microsoft" and authenticate as tester@attackertenant.onmicrosoft.com. The ID token the application receives looks like this when decoded (for example at jwt.ms):

{
  "iss": "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/v2.0",
  "aud": "11111111-1111-1111-1111-111111111111",
  "tid": "00000000-0000-0000-0000-000000000000",
  "oid": "22222222-2222-2222-2222-222222222222",
  "sub": "AAAAAAAAAAAAAAAAAAAAAExampleSubjectValue",
  "preferred_username": "tester@attackertenant.onmicrosoft.com",
  "email": "alice@corp.example.com"
}

iss, tid, oid and sub all point at the attacker's tenant and user. Only email names the victim.

4. Land in the victim's account

A vulnerable application matches alice@corp.example.com to the existing account and signs the attacker in as that user. No password, MFA prompt or consent of the victim is involved.

5. Check your own application registration (owners)

An application owner can see and change how the application receives unverified email values:

GET https://graph.microsoft.com/v1.0/applications/{application-object-id}?$select=id,appId,authenticationBehaviors

PATCH https://graph.microsoft.com/v1.0/applications/{application-object-id}/authenticationBehaviors
Content-Type: application/json

{
    "removeUnverifiedEmailClaim": true
}

Impact

The attacker gets a normal, fully authenticated session as the victim in the application: the victim's data, their settings, their API keys and integrations, and their role. If the victim is an administrator of their organization's workspace in that application, the attacker is too, and can add users, change single sign-on settings or export data.

The scale is what makes this serious. One attacker tenant and one user can be pointed at any email address, one after another, so every account in a vulnerable application is reachable, across all of that application's customers. Nothing is stolen from the victim, so nothing the victim can rotate or revoke ends the access. Only the application can.

The victim's own Entra tenant is not compromised. The exposure is the data and the privileges held in third-party applications, which is often where the customer records, source code or support tickets are.

OPSEC and artifacts

  • Nothing in the victim's tenant. The authentication happens in the attacker's tenant. The victim organization's sign-in logs, audit logs, Conditional Access and identity protection never see it. There is no artifact for the victim's own security team to collect.
  • A disposable tenant. The attacker's tenant can be new and free. The mail change is an Update user audit event, but in the attacker's own audit log.
  • A real Microsoft sign-in. The sign-in is a genuine interactive authentication for the application's client_id, visible to Microsoft and, in the attacker's tenant, to the attacker.
  • What the application can retain: the validated iss, tid, oid and sub of each sign-in, the claim it used to pick the local account, the account-link decision, and the source address and user agent of the session. This is the only place where the attack is visible, and only if the application logs the issuer and subject and not just the email.
  • The tell: a local account whose sign-ins suddenly carry a different tenant ID and subject than before, or an account-merge event that joined two identities without confirmation from both.

Detection

Detection is the application owner's job, in the application's own authentication logs.

  • Issuer or subject changed for an account. Record tid and sub (or oid) on every sign-in. A sign-in to an existing account from a tenant ID that account has never used, especially a tenant with no relationship to the email's domain, is the signature of the attack.
  • Several identities behind one email. Find local accounts linked to more than one issuer and subject pair. The example below assumes the application stores one row per successful sign-in in a table of its own:
-- Accounts reached by more than one (tenant, subject) pair that share an email value
SELECT email_claim,
       COUNT(DISTINCT tenant_id || ':' || subject) AS identities,
       MIN(signed_in_at) AS first_seen,
       MAX(signed_in_at) AS last_seen
FROM app_signin_events
GROUP BY email_claim
HAVING COUNT(DISTINCT tenant_id || ':' || subject) > 1
ORDER BY last_seen DESC;
  • Unverified email domain. Request the xms_edov optional claim. A token whose email claim is present and whose xms_edov is false carries an address the issuing tenant does not own.
  • Automatic account links. Review account-merge and account-recovery events that linked a new sign-in method to an existing account by matching email.

A customer of a third-party application cannot run these checks. What a customer can do is ask the vendor how accounts are keyed, and watch the application's own audit trail for sign-ins and administrative changes that its users did not make.

Mitigation

For application owners, most effective first:

  • Key accounts on issuer and subject. Use iss and sub, or tid and oid, as the immutable identifier. Treat email as contact data only. Keep the design the same across first sign-in, account recovery and account linking.
  • Migrate existing email-keyed accounts. Review links created by email match, including recovery and migration flows. Test with two identities that share an email and differ in subject: the expected result is two independent accounts unless an explicitly verified link exists.
  • Require confirmation from both identities before merging accounts, for example a sign-in with the existing method.
  • Stop receiving unverified emails. Set removeUnverifiedEmailClaim to true on the app registration through authenticationBehaviors, and use xms_edov if the application must read the claim.
  • Validate the whole token. Check the signature against keys bound to the expected issuer, the audience, and the tenant, and apply an allow list of tenants when the application is meant for known customers. A tenant the application never onboarded should not be able to sign in.
  • Register the application as single-tenant when only one organization uses it.

For organizations that consume such applications:

  • Ask vendors which claim identifies a user for Microsoft sign-in, and whether accounts are merged by email.
  • Prefer SAML or OIDC single sign-on configured per customer tenant over a generic multitenant social sign-in button, so the application only accepts your issuer for your accounts.
  • Review administrator accounts and audit logs in critical SaaS applications for sign-ins from unknown identities.

FAQ

Is nOAuth a vulnerability in Microsoft Entra ID?

It is a flaw in the relying application, made possible by how Entra ID fills the email claim. The claim comes from the user's mail attribute, which a tenant administrator can set to any value, including an address in a domain the tenant does not own. An application that treats that claim as the account key trusts something the issuer never verified. The fix belongs in the application: identify users by issuer and subject.

Can the victim's organization see or block the attack in its own tenant?

No. The sign-in happens in the attacker's tenant, with the attacker's own user, so the victim's sign-in logs, Conditional Access policies and MFA are never involved. The victim does not even need to use Microsoft sign-in: an account created with a password or another identity provider is taken over the same way if the application merges accounts by email.

Did Microsoft fix nOAuth?

Microsoft changed the default: email addresses whose domain owner is not verified are removed from the claim, except for single-tenant applications and for multitenant applications that already had sign-ins with unverified emails. Those excepted applications keep the old behavior until their owner sets removeUnverifiedEmailClaim to true. Microsoft also added the xms_edov claim, which says whether the email's domain owner was verified.

Which claims should an application use to identify a user?

The pair of issuer and subject (iss and sub), which is the identity key OpenID Connect defines, or for Entra ID the tenant ID and object ID pair (tid and oid). Email, UPN and preferred_username are mutable and can be reassigned or collide across issuers. Microsoft's claim reference says the email value is not guaranteed to be correct and must never be used for authorization.

References

Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.