XUserGetMsaTokenSilentlyAsync
Asynchronously retrieves the users MSA token.
Syntax
HRESULT XUserGetMsaTokenSilentlyAsync(
XUserHandle user,
XUserGetMsaTokenSilentlyOptions options,
const char* scope,
XAsyncBlock* async
)
Parameters
user _In_
Type: XUserHandle
A handle to the user whose MSA token is to be fetched.
options _In_In_
Options for retrieving the MSA token.
scope _In_z_
Type: char*
The scope of the web request.
async _Inout_
Type: XAsyncBlock*
An XAsyncBlock for polling the call's status and retrieving call results.
Return value
Type: HRESULT
Returns S_OK if successful; otherwise, returns an error code. For a list of error codes, see Error Codes.
Remarks
This API leverages the WebAuthenticationCoreManager.GetTokenSilentlyAsync method. This call always uses a provider of "https://login.microsoft.com", and a client corresponding to the MSA App ID that is part of the microsoftgame.config. The request is configured with "api-version" 2.0.
Upon completion of the asynchronous result, if there are any errors, the title will need to call XGameUiShowWebAuthenticationAsync in order to get the MSA token.
Requirements
Header: XUser.h
Library: xgameruntime.lib
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles