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

# PFProfilesSetProfilePolicyAsync

> Sets the profiles access policy

Sets the profiles access policy

## Syntax

```cpp theme={null}
HRESULT PFProfilesSetProfilePolicyAsync(  
    PFEntityHandle entityHandle,  
    const PFProfilesSetEntityProfilePolicyRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

**`request`**   [PFProfilesSetEntityProfilePolicyRequest\*](/services/playfab/api-references/c/pfprofilestypes/structs/pfprofilessetentityprofilepolicyrequest)

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 all platforms. This will set the access policy statements on the given entity profile. This is not additive, any existing statements will be replaced with the statements in this request. See also ProfileGetProfileAsync. When the asynchronous task is complete, call [PFProfilesSetProfilePolicyGetResultSize](/services/playfab/api-references/c/pfprofiles/functions/pfprofilessetprofilepolicygetresultsize) and [PFProfilesSetProfilePolicyGetResult](/services/playfab/api-references/c/pfprofiles/functions/pfprofilessetprofilepolicygetresult) to get the result.

## Requirements

**Header:** PFProfiles.h

## See also

[PFProfiles members](/services/playfab/api-references/c/pfprofiles/pfprofiles_members)


## Related topics

- [PFProfilesSetProfilePolicyGetResult](/services/playfab/api-references/c/pfprofiles/functions/pfprofilessetprofilepolicygetresult.md)
- [Services C API overview - PFProfiles.h](/services/playfab/api-references/c/pfprofiles/pfprofiles_members.md)
- [PFProfilesSetProfilePolicyGetResultSize](/services/playfab/api-references/c/pfprofiles/functions/pfprofilessetprofilepolicygetresultsize.md)
- [PFProfilesSetEntityProfilePolicyRequest](/services/playfab/api-references/c/pfprofilestypes/structs/pfprofilessetentityprofilepolicyrequest.md)
- [PFProfilesSetEntityProfilePolicyResponse](/services/playfab/api-references/c/pfprofilestypes/structs/pfprofilessetentityprofilepolicyresponse.md)
