> ## 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.

# PFAuthenticationLoginWithBattleNetAsync

> Client API that signs in the user with a Battle.net identity token on Windows. Call PFAuthenticationLoginWithBattleNetGetResult when the task completes.

Sign in the user with a Battle.net identity token

## Syntax

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

### Parameters

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigHandle returned from PFServiceConfigCreateHandle call.

**`request`**   [PFAuthenticationLoginWithBattleNetRequest\*](https://docs.xbox.com/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithbattlenetrequest.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 Windows. See also ClientLinkBattleNetAccountAsync, ClientUnlinkBattleNetAccountAsync. When the asynchronous task is complete, call [PFAuthenticationLoginWithBattleNetGetResult](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithbattlenetgetresult.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

- [PFAuthenticationLoginWithBattleNetGetResult](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithbattlenetgetresult.md)
- [PFAuthenticationLoginWithBattleNetGetResultSize](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithbattlenetgetresultsize.md)
- [Services C API overview - PFAuthentication.h](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationServerLoginWithBattleNetAsync](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithbattlenetasync.md)
- [PFAuthenticationReLoginWithBattleNetAsync](https://docs.xbox.com/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithbattlenetasync.md)
