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

# PFAccountManagementServerBanUsersAsync

> 指定されたゲームについて、任意で IP アドレスを指定して、PlayFab ID でユーザーを禁止します。

指定されたゲームについて、任意で IP アドレスを指定して、PlayFab ID でユーザーを禁止します。

## 構文

```cpp theme={null}
HRESULT PFAccountManagementServerBanUsersAsync(  
    PFEntityHandle titleEntityHandle,  
    const PFAccountManagementBanUsersRequest* request,  
    XAsyncBlock* async  
)  
```

### パラメーター

**`titleEntityHandle`**   PFEntityHandle

PFAuthenticationGetEntityWithSecretKeyAsync を使用して取得したタイトル Entity 用の PFEntityHandle。

**`request`**   [PFAccountManagementBanUsersRequest\*](https://docs.xbox.com/ja-jp/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementbanusersrequest.md)

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

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

非同期操作用の XAsyncBlock。

### 戻り値

型: HRESULT

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

## 解説

この API は、Windows、Linux、macOS で使用できます。各ユーザーの存在は検証されません。IP を指定して禁止する場合、複数のプレイヤーが影響を受ける可能性があるため、この機能は慎重に使用してください。新しい禁止に関する情報を返します。ServerGetUserBansAsync、ServerRevokeAllBansForUserAsync、ServerRevokeBansAsync、ServerUpdateBansAsync も参照してください。非同期タスクが完了したら、[PFAccountManagementServerBanUsersGetResultSize](https://docs.xbox.com/ja-jp/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverbanusersgetresultsize.md) と [PFAccountManagementServerBanUsersGetResult](https://docs.xbox.com/ja-jp/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverbanusersgetresult.md) を呼び出して結果を取得します。

## 要件

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

## 関連項目

[PFAccountManagement メンバー](https://docs.xbox.com/ja-jp/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members.md)


## Related topics

- [PFAccountManagementServerBanUsersGetResult](https://docs.xbox.com/ja-jp/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverbanusersgetresult.md)
- [PFAccountManagementServerGetUserBansAsync](https://docs.xbox.com/ja-jp/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementservergetuserbansasync.md)
- [PFAccountManagementServerRevokeAllBansForUserAsync](https://docs.xbox.com/ja-jp/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverrevokeallbansforuserasync.md)
- [PFAccountManagementServerUpdateBansAsync](https://docs.xbox.com/ja-jp/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverupdatebansasync.md)
- [PFAccountManagementServerRevokeBansAsync](https://docs.xbox.com/ja-jp/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverrevokebansasync.md)
