Microsoft Entra B2B: Gmail guest invitation redemption with built-in Google federation fails with AADSTS165000

Ilyass Krichi 5 Reputation points
2026-05-06T14:57:48.7066667+00:00

We are troubleshooting Microsoft Entra External ID B2B collaboration with the built-in Google identity provider. Gmail guests cannot redeem B2B invitations. The redemption flow fails with AADSTS165000 before the user is redirected to the target app.

Service/scenario: Microsoft Entra workforce tenant B2B collaboration Built-in Google identity provider for external users Guest invitation redemption for Gmail users Microsoft Graph POST /invitations and official Microsoft invitation email

Error: AADSTS165000: Invalid Request: The request did not include the required tokens for the user context. One or more of the user context values (cookies; form fields; headers) were not supplied, every request must include these values and maintain them across a complete single user flow. Failure Reasons:[Token was not provided;]

Example diagnostic values: Request ID: bef43cf8-146e-4a07-b243-f69ca8bb0300 Correlation ID: 5ea2cd53-f456-4741-ac42-ed59721f7dd2 Timestamp UTC: 2026-05-05T16:02:44Z

Observed flow:

  1. User opens Microsoft B2B invitation redemption link.
  2. Browser reaches invitations.microsoft.com / login.microsoftonline.com.
  3. Microsoft redirects to Google OAuth.
  4. Google auth request uses: response_type=code response_mode=form_post scope=openid email profile address redirect_uri=https://login.microsoftonline.com/tenant-id/federation/oauth2
  5. Browser returns to: https://login.microsoftonline.com/tenant-id/federation/oauth2
  6. Microsoft shows AADSTS165000.

What works: Normal sign-in through the main sign-in screen with the same built-in Google provider works and reaches Google consent.

What fails: Raw Graph inviteRedeemUrl fails. Official Microsoft invitation email link fails. A brand-new Gmail user on another computer fails. Fresh Chrome profile using --user-data-dir fails. The failure happens before redirecting to our app.

Configuration already checked:

Invitation payload tested: POST https://graph.microsoft.com/v1.0/invitations

{ "invitedUserEmailAddress": "gmail-user", "invitedUserDisplayName": "Test User", "inviteRedirectUrl": "https://myapps.microsoft.com", "sendInvitationMessage": true }

Also tested sendInvitationMessage=false and opening returned inviteRedeemUrl directly.

Question: Why does the B2B invitation redemption path fail with AADSTS165000 when normal Google sign-in works with the same built-in Google provider? Is there a tenant-level setting, Google provider object issue, or known Microsoft Entra invitation redemption issue that can cause the federation callback to lose or reject the required token/session context?

Microsoft Security | Microsoft Entra | Microsoft Entra External ID

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.