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

# PFGroupsAddMembersAsync

> Adds members to a group or role.

Adds members to a group or role.

## Syntax

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

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

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

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. Adds members to a group or role. Existing members of the group will added to roles within the group, but if the user is not already a member of the group, only title claimants may add them to the group, and others must use the group application or invite system to add new members to a group. Returns nothing if successful. See also GroupApplyToGroupAsync, GroupInviteToGroupAsync, GroupListGroupMembersAsync, GroupRemoveMembersAsync. 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 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)
- [PFGroupsRemoveMembersAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupsremovemembersasync.md)
- [PFGroupsChangeMemberRoleAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupschangememberroleasync.md)
- [PFGroupsAddMembersRequest](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsaddmembersrequest.md)
- [PFGroupsIsMemberAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupsismemberasync.md)
