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

# PFAccountManagementServerRevokeAllBansForUserAsync

> Revoke all active bans for a user.

Revoke all active bans for a user.

## Syntax

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

### Parameters

**`titleEntityHandle`**   PFEntityHandle

PFEntityHandle for a title Entity obtained using PFAuthenticationGetEntityWithSecretKeyAsync.

**`request`**   [PFAccountManagementRevokeAllBansForUserRequest\*](/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementrevokeallbansforuserrequest)

Populated request object.

**`async`**   XAsyncBlock\*<br />*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. Setting the active state of all non-expired bans for a user to Inactive. Expired bans with an Active state will be ignored, however. Returns information about applied updates only. See also ServerBanUsersAsync, ServerGetUserBansAsync, ServerRevokeBansAsync, ServerUpdateBansAsync. When the asynchronous task is complete, call [PFAccountManagementServerRevokeAllBansForUserGetResultSize](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverrevokeallbansforusergetresultsize) and [PFAccountManagementServerRevokeAllBansForUserGetResult](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverrevokeallbansforusergetresult) to get the result.

## Requirements

**Header:** PFAccountManagement.h

## See also

[PFAccountManagement members](/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members)


## Related topics

- [PFAccountManagementServerRevokeAllBansForUserGetResult](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverrevokeallbansforusergetresult.md)
- [Services C API overview - PFAccountManagement.h](/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members.md)
- [PFAccountManagementServerRevokeBansAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverrevokebansasync.md)
- [PFAccountManagementServerGetUserBansAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementservergetuserbansasync.md)
- [PFAccountManagementServerBanUsersAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserverbanusersasync.md)
