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

# PFAuthenticationLoginWithXUserAsync

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

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

## 構文

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

### パラメーター

**`serviceConfigHandle`**   PFServiceConfigHandle

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

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

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

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

非同期操作用の XAsyncBlock。

### 戻り値

型: HRESULT

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

## 解説

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

## 要件

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

## 関連項目

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


## Related topics

- [PFAuthenticationLoginWithXUserGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithxusergetresult.md)
- [PFAuthenticationLoginWithXUserGetResultSize](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithxusergetresultsize.md)
- [PFAuthenticationLoginWithXUserRequest](/ja-jp/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithxuserrequest.md)
- [クイックスタート (Windows) - Core SDK セットアップ](/ja-jp/services/playfab/sdks/unified-sdk/quickstart-core.md)
- [XBOX サービス タイトル向け PlayFab インテグレーション](/ja-jp/services/xbox-services/playfab-integration.md)
