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

# PartyLocalEndpoint::GetLocalUser

> Gets the local user associated with this local endpoint.

Gets the local user associated with this local endpoint.

## Syntax

```cpp theme={null}
PartyError GetLocalUser(  
    PartyLocalUser** localUser  
)  
```

### Parameters

**`localUser`**   [PartyLocalUser\*\*](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/partylocaluser.md)\
*library-allocated output, may return nullptr*

The output local user associated with this local endpoint, or nullptr.

### 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 [PartyManager::GetErrorMessage()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage.md).

## Remarks

If this endpoint isn't associated with a user, `localUser` is set to nullptr.

## Requirements

**Header:** Party.h

## See also

[PartyLocalEndpoint](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/partylocalendpoint.md)


## Related topics

- [PartyLocalEndpoint](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/partylocalendpoint.md)
- [PartyLocalEndpoint::GetEndpointStatistics](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)
- [PartyLocalEndpoint::SendMessage](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md)
- [PartyEndpoint::GetLocal](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getlocal.md)
- [PartyLocalChatControl::GetLocalUser](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_getlocaluser.md)
