December 4, 2026
nOAuth: Account Takeover via Microsoft’s Email Claim
Apps that trusted the email inside a Microsoft sign-in token let anyone with their own tenant log in as someone else

By Muhammad Asim Shahzad
3 min read
Apps that trusted the email inside a Microsoft sign-in token let anyone with their own tenant log in as someone else
AI-assisted: drafted with AI help from public sources, then reviewed and edited. This is an analytical case study of a public disclosure, not my own discovery.
An attacker needed no password, no phishing page and no access to the victim's mailbox, just a Microsoft tenant they controlled and a typed-in email address. nOAuth, disclosed by Descope in June 2023, turned "Log in with Microsoft" into full account takeover on apps that keyed users by email. The researchers reported more than $75,000 in bug bounties from affected companies.
Disclaimer:_ Educational and defensive use only. Microsoft and Descope disclosed this jointly on 20 June 2023 after Microsoft added new claims and guidance. Affected companies that were not named publicly stay unnamed here, and the proof-of-concept details are left out._
Vulnerability Overview
- Type: Authentication bypass in OpenID Connect integrations: a mutable, unverified email claim used as the account identifier
- CWE (analytical mapping): CWE-290 (Authentication Bypass by Spoofing), CWE-345 (Insufficient Verification of Data Authenticity)
- CVE / CVSS: Not reported
- Bounty: Over $75,000 in total across affected programs, per Descope, which said it would donate it to auth-related open source
How the nOAuth Takeover Worked (high level)
OpenID Connect gives every user a stable identifier in the token. Most providers also send an email claim. On Azure AD (now Microsoft Entra ID), that claim was mutable and unverified: a tenant admin could set a user's email to any address.
So the attacker builds their own tenant, sets their user's email to the victim's address, and clicks "Log in with Microsoft" on the target app. The token is genuinely signed. Only the claim the app reads is a lie.
If the app looked users up by that email, the attacker landed in the victim's account. The victim did not even need a Microsoft account, because many apps "helpfully" merge a new social login into any existing account with a matching email.
Descope tested hundreds of sites. Vulnerable ones included a design app with millions of monthly users, a publicly traded customer experience company and a multi-cloud consulting firm. Two authentication platforms merged accounts this way too, exposing every customer using Microsoft login. Both fixed it within days.
Business Impact
Full account takeover with nothing to phish and nothing for the victim to notice. Signature and issuer checks pass. An auth platform that merges accounts spreads the damage to every app built on it.
Defending Against nOAuth (my own analysis)
1. Key identities on the immutable subject. For Entra, Microsoft's guidance is the tenant ID plus object ID. Treat email, preferred username and UPN as display data.
2. Never auto-merge on a matching email. Linking a new login to an existing account needs proof from the existing owner, such as a link sent to the verified inbox.
3. Use the verification signals. Microsoft added an optional claim showing whether the email's domain is verified and a flag that strips unverified email claims.
# Pseudocode: federated login keyed on issuer + immutable subject, never on email
def on_microsoft_login(id_token):
c = verify_oidc(id_token, audience=CLIENT_ID) # signature, iss, aud, exp, nonce
key = ("entra", c["tid"], c["oid"]) # stable per user, per tenant
user = identities.lookup(key)
if user:
return start_session(user)
match = users.find_by_email(c.get("email")) # a hint, never proof
if match:
link_requests.create(user=match, identity=key) # pending until the owner confirms
mail(match.verified_email, "Confirm linking a Microsoft login to your account")
return show("Check your inbox to finish linking")
return start_session(users.create(identity=key, email_verified=False))
def confirm_link(token, session):
req = link_requests.consume(token) # single use, short TTL
if not req or session.user_id != req.user.id:
return deny(403) # only the owner can attach a login
identities.attach(req.identity, req.user)
# Test: attacker token with victim email -> no session for victim, link stays pending# Pseudocode: federated login keyed on issuer + immutable subject, never on email
def on_microsoft_login(id_token):
c = verify_oidc(id_token, audience=CLIENT_ID) # signature, iss, aud, exp, nonce
key = ("entra", c["tid"], c["oid"]) # stable per user, per tenant
user = identities.lookup(key)
if user:
return start_session(user)
match = users.find_by_email(c.get("email")) # a hint, never proof
if match:
link_requests.create(user=match, identity=key) # pending until the owner confirms
mail(match.verified_email, "Confirm linking a Microsoft login to your account")
return show("Check your inbox to finish linking")
return start_session(users.create(identity=key, email_verified=False))
def confirm_link(token, session):
req = link_requests.consume(token) # single use, short TTL
if not req or session.user_id != req.user.id:
return deny(403) # only the owner can attach a login
identities.attach(req.identity, req.user)
# Test: attacker token with victim email -> no session for victim, link stays pendingKey Takeaways
- A valid signature proves who issued the token, not that every claim in it is true.
- Email is contact data. The subject claim is the identity.
- Account merging is an authentication feature, and it needs its own proof of ownership.
Credit & Sources
Discovered by the Descope security team; write-up by Omer Cohen, Descope CSO. Primary source: nOAuth: How Microsoft OAuth Misconfiguration Can Lead to Full Account Takeover, published 20 June 2023. Supporting: Microsoft identity platform claims validation guidance. Facts come from those pages; analysis and code are original.
Next breakdown: the Next.js header that told middleware to skip its own security checks. Follow @masimshahzad for daily bug bounty breakdowns.