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

# PartyChatControl::GetEntityId

> Gets the PlayFab Entity ID of the user associated with this chat control.

Gets the PlayFab Entity ID of the user associated with this chat control.

## Syntax

```cpp theme={null}
PartyError GetEntityId(  
    PartyString* entityId  
)  
```

### Parameters

**`entityId`**   [PartyString\*](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/typedefs.md)\
*library-allocated output*

The output Entity ID.

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

The returned string is the same value as the one found in the *id* field of a `PFEntityKey` structure representing the entity. The value returned from [GetEntityType()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getentitytype.md) would represent the other half of a `PFEntityKey`. \
\
&#x20;The memory for the Entity ID string remains valid for the life of the chat control, which is until its [PartyChatControlDestroyedStateChange](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partychatcontroldestroyedstatechange.md) and/or [PartyDestroyChatControlCompletedStateChange](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/structs/partydestroychatcontrolcompletedstatechange.md), depending on the type of destruction that occurred, has been provided via [PartyManager::StartProcessingStateChanges()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges.md) and all state changes referencing the chat control have been returned to [PartyManager::FinishProcessingStateChanges()](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_finishprocessingstatechanges.md).

## Requirements

**Header:** Party.h

## See also

[PartyChatControl](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/partychatcontrol.md)\
[PartyChatControl::GetEntityType](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getentitytype.md)


## Related topics

- [PartyChatControl::GetEntityType](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getentitytype.md)
- [PartyChatControl::GetNetworks](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getnetworks.md)
- [PartyChatControl::GetLocal](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getlocal.md)
- [PartyChatControl::GetDevice](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getdevice.md)
- [PartyChatControl::GetCustomContext](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getcustomcontext.md)
