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

# PFGroupsDeleteRoleAsync

> Deletes an existing role in a group.

Deletes an existing role in a group.

## Syntax

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

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

**`request`**   [PFGroupsDeleteRoleRequest\*](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsdeleterolerequest)

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. Returns information about the role See also GroupCreateRoleAsync. Call XAsyncGetStatus to get the status of the operation. If the service call is unsuccessful, the async result will be E\_PF\_ROLE\_DOES\_NOT\_EXIST, E\_PF\_ROLE\_IS\_GROUP\_ADMIN, E\_PF\_ROLE\_IS\_GROUP\_DEFAULT\_MEMBER or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling.

## Requirements

**Header:** PFGroups.h

## See also

[PFGroups members](/services/playfab/api-references/c/pfgroups/pfgroups_members)


## Related topics

- [Services C API overview - PFGroups.h](/services/playfab/api-references/c/pfgroups/pfgroups_members.md)
- [PFGroupsDeleteGroupAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupsdeletegroupasync.md)
- [PFGroupsUpdateRoleAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupsupdateroleasync.md)
- [PFGroupsCreateRoleAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupscreateroleasync.md)
- [PFGroupsDeleteRoleRequest](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsdeleterolerequest.md)
