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

> 外部のサーバー バックエンドからの XBOX Live トークンを使用してユーザーをサインインさせ、認証済みユーザーが必要な API 呼び出しに以降使用できるセッション識別子を返します

外部のサーバー バックエンドからの XBOX Live トークンを使用してユーザーをサインインさせ、認証済みユーザーが必要な API 呼び出しに以降使用できるセッション識別子を返します

## 構文

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

### パラメーター

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigCreateHandle 呼び出しから返された PFServiceConfigHandle。

**`secretKey`**   char\*<br />*In\_z*

サービス リクエストの認証に使用する Title Secret Key。

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

値が設定されたリクエスト オブジェクト。

**`async`**   XAsyncBlock\*<br />*Inout*

非同期操作用の XAsyncBlock。

### 戻り値

型: HRESULT

この API 操作の結果コード。

## 解説

この API は Win32、Linux、macOS で利用できます。ユーザーが初めて XBOX Live アカウントでサインインし、CreateAccount が true に設定されている場合、新しい PlayFab アカウントが作成され、XBOX Live アカウントにリンクされます。この場合、メール アドレスやユーザー名は PlayFab アカウントに関連付けられません。それ以外に、XBOX Live アカウントにリンクされた PlayFab アカウントが存在しない場合はその旨を示すエラーが返されるので、タイトルはユーザーが PlayFab アカウントを作成できるよう誘導できます。ServerLinkXboxAccountAsync、ServerUnlinkXboxAccountAsync も参照してください。非同期タスクが完了したら、[PFAuthenticationServerLoginWithXboxGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxgetresult) を呼び出して結果を取得します。

## 要件

**ヘッダー:** PFAuthentication.h

## 関連項目

[PFAuthentication のメンバー](/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationServerLoginWithXboxGetResultSize](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxgetresultsize.md)
- [PFAuthenticationServerLoginWithXboxGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxgetresult.md)
- [Services C API overview - PFAuthentication.h](/ja-jp/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationServerLoginWithXboxIdAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidasync.md)
- [PFAuthenticationServerLoginWithXboxIdGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidgetresult.md)
