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

# 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\*](/services/playfab/multiplayer/networking/reference/typedefs)\
*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()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage).

## 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()](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getentitytype) would represent the other half of a `PFEntityKey`. <br /><br /> The memory for the Entity ID string remains valid for the life of the chat control, which is until its [PartyChatControlDestroyedStateChange](/services/playfab/multiplayer/networking/reference/structs/partychatcontroldestroyedstatechange) and/or [PartyDestroyChatControlCompletedStateChange](/services/playfab/multiplayer/networking/reference/structs/partydestroychatcontrolcompletedstatechange), depending on the type of destruction that occurred, has been provided via [PartyManager::StartProcessingStateChanges()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges) and all state changes referencing the chat control have been returned to [PartyManager::FinishProcessingStateChanges()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_finishprocessingstatechanges).

## Requirements

**Header:** Party.h

## See also

[PartyChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/partychatcontrol)\
[PartyChatControl::GetEntityType](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/methods/partychatcontrol_getentitytype)


## Related topics

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