I have also some issues:
Scenario
I am implementing On‑Behalf‑Of (OBO) flow with Microsoft identity platform to access Microsoft Graph.
User identity source: AWS ALB OIDC (not Azure AD).
ALB‑issued ID tokens are not supported as user assertions for OBO.
Therefore, I generate a synthetic user assertion JWT to represent the user.
OBO request
I call:
POST https://login.microsoftonline.com/<tenant>/oauth2/v2.0/token
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
client_id=<client_id>
client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
client_assertion=<signed JWT with uploaded cert>
requested_token_use=on_behalf_of
assertion=<synthetic user assertion JWT>
scope=https://graph.microsoft.com/.default
Client assertion:
Signed with my uploaded certificate
aud = token endpoint
Local verification ✅
User assertion:
Synthetic JWT because ALB token is not AAD‑issued
Tried multiple formats:
Signed JWT (`aud` = my API URI)
Signed JWT (`aud` = token endpoint)
Unsigned JWT (alg=none)
Opaque string / raw ALB token
Local verification ✅
What I observe
- Every OBO request fails with:
- Client assertion:
- Signed with my uploaded certificate
-
aud = token endpoint
- Local verification ✅
- User assertion:
- Synthetic JWT because ALB token is not AAD‑issued
- Tried multiple formats:
- Signed JWT (
aud = my API URI)
- Signed JWT (
aud = token endpoint)
- Unsigned JWT (alg=none)
- Opaque string / raw ALB token
- Local verification ✅
What I observe Every OBO request fails with:
AADSTS50013: Assertion failed signature validation.
Reason - The key was not found.
Thumbprint of key used by client: <my cert SHA1>
Local signature verification of all signed JWTs works ✅
Certificate is uploaded in App Registration, thumbprint matches, and is active
Using client_assertion only (no client_secret) → still fails
Tried changing user assertion audience and opaque values → still fails
What I already tried
Verified local JWT creation and RS256 signing with BouncyCastle
Confirmed iat > certificate startDateTime
Confirmed client_assertion audience = token endpoint
Tested synthetic user assertion in all supported formats
Confirmed cert is visible in keyCredentials and thumbprint matches the log
Current status
- Azure AD always returns
AADSTS50013: key not found for the thumbprint that is active in the app registration.
Appears that OBO token exchange fails even when client assertion is correct.
This blocks OBO with non‑AAD identities (ALB) using a synthetic JWT user assertion.
Local signature verification of all signed JWTs works ✅
Certificate is uploaded in App Registration, thumbprint matches, and is active
Using client_assertion only (no client_secret) → still fails
Tried changing user assertion audience and opaque values → still fails
What I already tried
Verified local JWT creation and RS256 signing with BouncyCastle
Confirmed iat > certificate startDateTime
Confirmed client_assertion audience = token endpoint
Tested synthetic user assertion in all supported formats
Confirmed cert is visible in keyCredentials and thumbprint matches the log
Current status
Azure AD always returns AADSTS50013: key not found for the thumbprint that is active in the app registration.
Appears that OBO token exchange fails even when client assertion is correct.
- This blocks OBO with non‑AAD identities (ALB) using a synthetic JWT user assertion.
I do not know what else to try.... thanks for help.