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

# PartyManager::GetLocalUsers

> Gets an array containing all local users created by.

Gets an array containing all local users created by [CreateLocalUser()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createlocaluser.md) or [CreateLocalUserWithEntityType()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createlocaluserwithentitytype.md).

## Syntax

```cpp theme={null}
PartyError GetLocalUsers(  
    uint32_t* userCount,  
    PartyLocalUserArray* localUsers  
)  
```

### Parameters

**`userCount`**   uint32\_t\*\
*output*

The output number of local users provided in `localUsers`.

**`localUsers`**   [PartyLocalUserArray\*](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/typedefs.md)\
*library-allocated output array of size `*userCount`*

A library-allocated output array containing the local users.

### Return value

PartyError

`c_partyErrorSuccess` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [GetErrorMessage()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage.md).

## Remarks

Once a [PartyDestroyLocalUserCompletedStateChange](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partydestroylocalusercompletedstatechange.md) has been provided by [PartyManager::StartProcessingStateChanges()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges.md), the local user will no longer be present in the array returned by this method. \
\
&#x20;The memory for the returned array is invalidated whenever the title calls PartyManager::StartProcessingStateChanges(), or when CreateLocalUser() or CreateLocalUserWithEntityType() returns success.

## Requirements

**Header:** Party.h

## See also

[PartyManager](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/partymanager.md)\
[PartyManager::CreateLocalUser](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createlocaluser.md)\
[PartyManager::CreateLocalUserWithEntityType](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createlocaluserwithentitytype.md)\
[PartyManager::DestroyLocalUser](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_destroylocaluser.md)\
[PartyDestroyLocalUserCompletedStateChange](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partydestroylocalusercompletedstatechange.md)


## Related topics

- [PartyManager::DestroyLocalUser](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_destroylocaluser.md)
- [PartyManager::CreateLocalUser](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createlocaluser.md)
- [PartyLocalUser](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/partylocaluser.md)
- [PartyManager::CreateLocalUserWithEntityType](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_createlocaluserwithentitytype.md)
- [PartyNetwork::GetLocalUsers](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyNetwork/methods/partynetwork_getlocalusers.md)
