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

# PFGroupsInviteToGroupRequest

> PFGroupsInviteToGroupRequest data model. Invites a player to join a group, if they are not blocked by the group. An optional role can be provided to.

PFGroupsInviteToGroupRequest data model. Invites a player to join a group, if they are not blocked by the group. An optional role can be provided to automatically assign the player to the role if they accept the invitation. By default, if the entity has an application to the group outstanding, this will accept the application instead and return an error indicating such, rather than creating a duplicate invitation to join that will need to be cleaned up later. Returns information about the new invitation or an error indicating an existing application to join was accepted.

## Syntax

```cpp theme={null}
typedef struct PFGroupsInviteToGroupRequest {  
    bool const* autoAcceptOutstandingApplication;  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    PFEntityKey const* entity;  
    PFEntityKey const* group;  
    const char* roleId;  
} PFGroupsInviteToGroupRequest;  
```

### Members

**`autoAcceptOutstandingApplication`**   bool const\*<br />*may be nullptr*

(Optional) Optional, default true. Automatically accept an application if one exists instead of creating an invitation.

**`customTags`**   [PFStringDictionaryEntry](/services/playfab/api-references/c/pftypes/structs/pfstringdictionaryentry) const\*<br />*may be nullptr*

(Optional) The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

**`customTagsCount`**   uint32\_t

Count of customTags

**`entity`**   [PFEntityKey](/services/playfab/api-references/c/pftypes/structs/pfentitykey-c) const\*

The entity to perform this action on.

**`group`**   [PFEntityKey](/services/playfab/api-references/c/pftypes/structs/pfentitykey-c) const\*

The identifier of the group.

**`roleId`**   const char\*<br />*is null-terminated*

(Optional) Optional. ID of an existing a role in the group to assign the user to. The group's default member role is used if this is not specified. Role IDs must be between 1 and 64 characters long.

## Requirements

**Header:** PFGroupsTypes.h

## See also

[PFGroupsTypes members](/services/playfab/api-references/c/pfgroupstypes/pfgroupstypes_members)


## Related topics

- [PFGroupsInviteToGroupAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupsinvitetogroupasync.md)
- [Services C API overview - PFGroupsTypes.h](/services/playfab/api-references/c/pfgroupstypes/pfgroupstypes_members.md)
- [PFGroupsApplyToGroupRequest](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsapplytogrouprequest.md)
- [PFGroupsInviteToGroupResponse](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsinvitetogroupresponse.md)
- [PFGroupsAddMembersRequest](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsaddmembersrequest.md)
