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

# PFAuthenticationServerLoginWithXboxIdAsync

> XBOX ID と Sandbox ID を使用してユーザーをサインインさせ、認証済みユーザーが必要な API 呼び出しに以降使用できるセッション識別子を返します

XBOX ID と Sandbox ID を使用してユーザーをサインインさせ、認証済みユーザーが必要な API 呼び出しに以降使用できるセッション識別子を返します

## 構文

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

### パラメーター

**`serviceConfigHandle`**   PFServiceConfigHandle

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

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

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

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

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

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

非同期操作用の XAsyncBlock。

### 戻り値

型: HRESULT

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

## 解説

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

## 要件

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

## 関連項目

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


## Related topics

- [PFAuthenticationServerLoginWithXboxIdGetResultSize](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidgetresultsize.md)
- [PFAuthenticationServerLoginWithXboxIdGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidgetresult.md)
- [Services C API overview - PFAuthentication.h](/ja-jp/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationServerLoginWithServerCustomIdAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidasync.md)
- [PFAuthenticationServerLoginWithSteamIdAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithsteamidasync.md)
