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

# PFAccountManagementServerGetUserBansAsync

> Gets all bans for a user.

Gets all bans for a user.

## Syntax

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

### Parameters

**`titleEntityHandle`**   PFEntityHandle

PFEntityHandle for a title Entity obtained using PFAuthenticationGetEntityWithSecretKeyAsync.

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

Populated request object.

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

XAsyncBlock for the async operation.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This API is available on Win32, Linux, and macOS. Get all bans for a user, including inactive and expired bans. See also ServerBanUsersAsync, ServerRevokeAllBansForUserAsync, ServerRevokeBansAsync, ServerUpdateBansAsync. When the asynchronous task is complete, call [PFAccountManagementServerGetUserBansGetResultSize](https://docs.xbox.com/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementservergetuserbansgetresultsize.md) and [PFAccountManagementServerGetUserBansGetResult](https://docs.xbox.com/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementservergetuserbansgetresult.md) to get the result.

## Requirements

**Header:** PFAccountManagement.h

## See also

[PFAccountManagement members](https://docs.xbox.com/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members.md)


## Related topics

- [PFAccountManagementServerGetUserBansGetResult](https://docs.xbox.com/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementservergetuserbansgetresult.md)
- [Services C API overview - PFAccountManagement.h](https://docs.xbox.com/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members.md)
- [PFAccountManagementServerBanUsersAsync](https://docs.xbox.com/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverbanusersasync.md)
- [PFAccountManagementServerRevokeBansAsync](https://docs.xbox.com/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverrevokebansasync.md)
- [PFAccountManagementServerUpdateBansAsync](https://docs.xbox.com/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverupdatebansasync.md)
