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

# XblPrivacyBatchCheckPermissionAsync

> XblPrivacyBatchCheckPermissionAsync

Check multiple permissions with multiple target users. Each permission will be checked against each target user.

## Syntax

```cpp theme={null}
HRESULT XblPrivacyBatchCheckPermissionAsync(  
         XblContextHandle xblContextHandle,  
         XblPermission* permissionsToCheck,  
         size_t permissionsCount,  
         uint64_t* targetXuids,  
         size_t xuidsCount,  
         XblAnonymousUserType* targetAnonymousUserTypes,  
         size_t targetAnonymousUserTypesCount,  
         XAsyncBlock* async  
)  
```

### Parameters

*xblContextHandle*   \_In\_\
Type: [XblContextHandle](https://docs.xbox.com/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

XBOX services context for the local user.

*permissionsToCheck*   \_In\_reads\_(permissionsCount)\
Type: [XblPermission\*](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/enums/xblpermission.md)

Array of permissions to check.

*permissionsCount*   \_In\_\
Type: size\_t

Number of entries in the permissions array.

*targetXuids*   \_In\_reads\_(xuidsCount)\
Type: uint64\_t\*

Array of target Xuids to check permissions against.

*xuidsCount*   \_In\_\
Type: size\_t

Number of entries in the xuids array.

*targetAnonymousUserTypes*   \_In\_reads\_(targetAnonymousUserTypesCount)\
Type: [XblAnonymousUserType\*](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/enums/xblanonymoususertype.md)

Array of anonymous user types to check permissions against.

*targetAnonymousUserTypesCount*   \_In\_\
Type: size\_t

Number of entries in the user types array.

*async*   \_In\_\
Type: XAsyncBlock\*

The AsyncBlock for this operation.

### Return value

Type: HRESULT

Returns S\_OK if the request started. S\_OK doesn't mean that permission was granted or that the operation is complete.

The function validates its arguments before it starts the request. Possible error codes include the following. This list isn't exhaustive.

| Return code | Description |
| - | - |
| S\_OK | The request started. Get the results after the operation completes. |
| E\_INVALIDARG | *xblContextHandle* is null; *permissionsToCheck* is null or *permissionsCount* is 0; *targetXuids* is null and *xuidsCount* isn't 0; *targetAnonymousUserTypes* is null and *targetAnonymousUserTypesCount* isn't 0; or both *xuidsCount* and *targetAnonymousUserTypesCount* are 0. |

## Remarks

Call [XblPrivacyBatchCheckPermissionResultSize](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacybatchcheckpermissionresultsize.md) and [XblPrivacyBatchCheckPermissionResult](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacybatchcheckpermissionresult.md) upon completion to get result.

The function copies *permissionsToCheck*, *targetXuids*, and *targetAnonymousUserTypes* before it returns, so you can release those arrays after the call.

If the operation fails, `XblPrivacyBatchCheckPermissionResultSize` and `XblPrivacyBatchCheckPermissionResult` return the failure HRESULT. Pass that HRESULT to [XblGetErrorCondition](https://docs.xbox.com/reference/live/xsapi-c/errors_c/functions/xblgeterrorcondition.md) to classify it. A failed request is different from a successful result in which `isAllowed` is false, but in both cases block the action that the permission protects. If the condition is `XblErrorCondition::Http429TooManyRequests`, the service is throttling your title. Wait before you try again, and limit how often you retry.

## Requirements

**Header:** privacy\_c.h

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[privacy\_c](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/privacy_c_members.md)


## Related topics

- [XblPrivacyBatchCheckPermissionResult](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacybatchcheckpermissionresult.md)
- [XblPrivacyBatchCheckPermissionResultSize](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacybatchcheckpermissionresultsize.md)
- [XblPermission](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/enums/xblpermission.md)
- [XblPrivacyCheckPermissionAsync](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/functions/xblprivacycheckpermissionasync.md)
- [privacy_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/privacy_c/privacy_c_members.md)
