- Experiences where there isn’t a game client within the flow
- Linking the user’s XBOX account to your own service’s account for the user
- Games and services that are already using XBOX Security Tokens (XSTS or X-tokens) authentication for client-to-service and service-to-service calls
X-token requirement
This process requires the use of a Delegated Auth X-Token to identify the user that the User Store ID represents. For more information on Delegated Auth X-Tokens and how to create them, see the “Title service calls to XBOX services” documentation.OAuth 2.0 requirements to generate the User Store IDs
If your service uses OAuth to have the user sign in with their Microsoft Account (MSA), the following are required:- User must have an XBOX identity tied to their Microsoft Account as the OAuth credentials need to be exchanged for an X-token.
- The OAuth scope you request must include both
xboxlive.signinandxboxlive.offline_accessto ensure proper user consent for this flow and ability to retrieve the required X-token.
Steps when using OAuth 2.0 credentials
With OAuth, you obtain user consent and exchange OAuth credentials for an X-token against your relying party. After that, continue with the same flow in Steps when using X-Tokens. Outline flow to exchange OAuth credentials for an X-token:- Obtain the OAuth 2.0 authorization code
- Exchange the authorization code for an RPS token (also called a Microsoft Account access token)
- Exchange the RPS token for an XBOX User Token
- Exchange the XBOX User Token for an X-Token against your own Relying Party
- Use the X-token in Steps when using X-Tokens.
Steps when using X-Tokens
After you have an X-token that identifies the user for your relying party, use itsDelegationToken claim to create a Delegated Auth X-token. The initial X-token can come from either the game client or the OAuth 2.0 flow.
Outline flow to create a Delegated Auth X-token:
- Extract the DelegationToken claim (
dlt) from the user’s X-token. - Obtain a Service Token from the XSAS service using your Business Partner certificate.
- Exchange the DelegationToken, Service Token, and target Relying Party (see table) for a Delegated Auth X-token.
