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

# AddEntityToSession SignalR server method

> AddEntityToSession SignalR server method for PlayFab real-time messages, adding another local entity to a shared session for multi-account devices.

<Note>
  The REST and SignalR APIs documented here are more complex than the client SDKs. Consider using the [Lobby C++ SDK](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members) or [Matchmaking C++ SDK](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members) instead, unless those SDKs don't meet your needs.
</Note>

For scenarios where multiple entities are signed in to the same device. Add an
additional entity to the session, other than the entity that started the
session. This will allow the client to receive messages for multiple local
entities on a shared session.

```text theme={null}
SharedSessionResponse AddEntityToSession(SharedSessionRequest request)
```

<Tip>
  This is a SignalR server method. See [documentation on calling server methods](https://learn.microsoft.com/en-us/aspnet/core/signalr/dotnet-client#call-hub-methods-from-client) from a SignalR client.
</Tip>

## Parameters

[**`SharedSessionRequest`**](/services/playfab/multiplayer/real-time-messages/types/shared-session-request)

## Return value

[**`SharedSessionResponse`**](/services/playfab/multiplayer/real-time-messages/types/shared-session-response)

## See also

* Server method [RemoveEntityFromSession](/services/playfab/multiplayer/real-time-messages/server-methods/remove-entity-from-session).
* [Real-time messages SignalR Hub](/services/playfab/multiplayer/real-time-messages/signalr-hub)
* [Real-time messages for Lobby and Matchmaking APIs](/services/playfab/multiplayer/real-time-messages/overview)
