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

# XblSocialManagerUserGroupGetUsers

> 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](/reference/live/xsapi-c/social_manager_c/handles/xblsocialmanagerusergrouphandle)

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](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerdowork) 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](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerdowork). If the user objects are needed beyond the scope of the next [XblSocialManagerDoWork](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerdowork) call, they are statically sized and trivially copyable. Call this API after calling either [XblSocialManagerCreateSocialUserGroupFromFilters](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagercreatesocialusergroupfromfilters) or [XblSocialManagerCreateSocialUserGroupFromList](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagercreatesocialusergroupfromlist) to create an XblSocialManagerUserGroup. Have the XblSocialManagerUserGroupHandle returned by the [XblSocialManagerEventType](/reference/live/xsapi-c/social_manager_c/enums/xblsocialmanagereventtype)::SocialUserGroupLoaded event in [XblSocialManagerDoWork](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerdowork).

## Requirements

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

**Library:** Microsoft.Xbox.Services.14x.GDK.C.lib

## See also

[social\_manager\_c](/reference/live/xsapi-c/social_manager_c/social_manager_c_members)
