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

# PFAuthenticationServerLoginWithXboxAsync

> Connecte l'utilisateur à l'aide d'un jeton XBOX Live à partir d'un serveur principal externe, en retournant un identificateur de session qui peut ensuite être utilisé pour les appels d'API nécessitant un utilisateur authentifié.

Connecte l'utilisateur à l'aide d'un jeton XBOX Live à partir d'un serveur principal externe, en retournant un identificateur de session qui peut ensuite être utilisé pour les appels d'API nécessitant un utilisateur authentifié

## Syntaxe

```cpp theme={null}
HRESULT PFAuthenticationServerLoginWithXboxAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const char* secretKey,  
    const PFAuthenticationServerLoginWithXboxRequest* request,  
    XAsyncBlock* async  
)  
```

### Paramètres

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigHandle retourné par l'appel à PFServiceConfigCreateHandle.

**`secretKey`**   char\*\
*In\_z*

Clé secrète du titre utilisée pour authentifier la requête de service.

**`request`**   [PFAuthenticationServerLoginWithXboxRequest\*](/fr-CA/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationserverloginwithxboxrequest)

Objet de requête renseigné.

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

XAsyncBlock pour l'opération asynchrone.

### Valeur de retour

Type : HRESULT

Code de résultat de cette opération d'API.

## Notes

Cette API est disponible sur Win32, Linux et macOS. S'il s'agit de la première connexion d'un utilisateur avec le compte XBOX Live et que CreateAccount est défini à true, un nouveau compte PlayFab sera créé et lié au compte XBOX Live. Dans ce cas, aucune adresse courriel ni aucun nom d'utilisateur ne sera associé au compte PlayFab. Sinon, si aucun compte PlayFab n'est lié au compte XBOX Live, une erreur l'indiquant sera retournée, afin que le titre puisse guider l'utilisateur dans la création d'un compte PlayFab. Voir aussi ServerLinkXboxAccountAsync, ServerUnlinkXboxAccountAsync. Une fois la tâche asynchrone terminée, appelez [PFAuthenticationServerLoginWithXboxGetResult](/fr-CA/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxgetresult) pour obtenir le résultat.

## Configuration requise

**En-tête :** PFAuthentication.h

## Voir aussi

[Membres de PFAuthentication](/fr-CA/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationServerLoginWithXboxGetResultSize](/fr-CA/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxgetresultsize.md)
- [PFAuthenticationServerLoginWithXboxGetResult](/fr-CA/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxgetresult.md)
- [Vue d'ensemble de l'API C Services - PFAuthentication.h](/fr-CA/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationServerLoginWithXboxIdAsync](/fr-CA/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidasync.md)
- [PFAuthenticationServerLoginWithPSNAsync](/fr-CA/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithpsnasync.md)
