> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFAuthenticationLoginWithXboxAsync

> Signs the user in using a XBOX Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user. If possible, PFAuthenticationLoginWithXUserAsync should be preferred, as it will more seamlessly handle automatic token refresh.

Signs the user in using a XBOX Live Token, returning a session identifier that can subsequently be used for API calls which require an authenticated user. If possible, PFAuthenticationLoginWithXUserAsync should be preferred, as it will more seamlessly handle automatic token refresh.

## Syntax

```cpp theme={null}
HRESULT PFAuthenticationLoginWithXboxAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const PFAuthenticationLoginWithXboxRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigHandle returned from PFServiceConfigCreateHandle call.

**`request`**   [PFAuthenticationLoginWithXboxRequest\*](https://docs.xbox.com/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithxboxrequest.md)

Populated request object.

**`async`**   XAsyncBlock\*\
*Inout*

XAsyncBlock for the async operation.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This API is available on all platforms. When the asynchronous task is complete, call [PFAuthenticationLoginWithXboxGetResult](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithxboxgetresult.md) to get the result.

## Requirements

**Header:** PFAuthentication.h

## See also

[PFAuthentication members](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)


## Related topics

- [PFAuthenticationLoginWithXboxGetResultSize](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithxboxgetresultsize.md)
- [PFAuthenticationLoginWithXboxGetResult](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithxboxgetresult.md)
- [Services C API overview - PFAuthentication.h](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [Account linking strategies for PlayFab Game Saves](https://docs.xbox.com/services/playfab/player-progression/game-saves/linking.md)
- [PFAuthenticationReLoginWithXboxAsync](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithxboxasync.md)
