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

# XblSocialManagerUserGroupGetUsers

> XblSocialManagerUserGroupGetUsers

Gets an XblSocialManagerUserPtrArray of the users tracked by the user group.

## Syntax

```cpp theme={null}
HRESULT XblSocialManagerUserGroupGetUsers(  
         XblSocialManagerUserGroupHandle group,  
         XblSocialManagerUserPtrArray* users,  
         size_t* usersCount  
)  
```

### Parameters

*group*   \_In\_\
Type: [XblSocialManagerUserGroupHandle](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/handles/xblsocialmanagerusergrouphandle.md)

The group handle from which to get users.

*users*   \_Outptr\_result\_maybenull\_\
Type: XblSocialManagerUserPtrArray\*

Passes back a pointer to an array of XblSocialManagerUser objects. The memory for the returned pointer remains valid until the next time [XblSocialManagerDoWork](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerdowork.md) is called.

*usersCount*   \_Out\_\
Type: size\_t\*

Passes back the size of the users array.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

The XblSocialManagerUserPtrArray is only guaranteed to be valid until the next call to [XblSocialManagerDoWork](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerdowork.md). If the user objects are needed beyond the scope of the next [XblSocialManagerDoWork](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerdowork.md) call, they are statically sized and trivially copyable. Call this API after calling either [XblSocialManagerCreateSocialUserGroupFromFilters](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagercreatesocialusergroupfromfilters.md) or [XblSocialManagerCreateSocialUserGroupFromList](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagercreatesocialusergroupfromlist.md) to create an XblSocialManagerUserGroup. Have the XblSocialManagerUserGroupHandle returned by the [XblSocialManagerEventType](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/enums/xblsocialmanagereventtype.md)::SocialUserGroupLoaded event in [XblSocialManagerDoWork](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerdowork.md).

## Requirements

**Header:** social\_manager\_c.h

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

## See also

[social\_manager\_c](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/social_manager_c_members.md)


## Related topics

- [Social Manager overview](https://docs.xbox.com/services/xbox-services/community/social-manager/live-social-manager-overview.md)
- [social_manager_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/social_manager_c_members.md)
- [XblSocialManagerUserGroupGetUsersTrackedByGroup](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerusergroupgetuserstrackedbygroup.md)
- [XblSocialManagerUserGroupGetLocalUser](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerusergroupgetlocaluser.md)
- [XblSocialManagerUserGroupGetFilters](https://docs.xbox.com/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerusergroupgetfilters.md)
