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

# PlayFabMultiplayer.JoinLobby

> PlayFabMultiplayer.JoinLobby

## Method (1 of 2)

Join a lobby as the local PlayFab entity.

```csharp theme={null}
public static Lobby JoinLobby(PFEntityKey newMember, string connectionString, 
    IDictionary<string, string> memberKeyValuePairs)
```

| parameter | description |
| - | - |
| newMember | The local entity joining the lobby. |
| connectionString | The connection string used by the entity to join the lobby. |
| memberKeyValuePairs | The number of initial member properties for the joiner of the lobby. |

## Return Value (1 of 2)

Output lobby object which can be used to queue operations for immediate execution of this operation.

## Remarks (1 of 2)

This is an asynchronous operation. Upon successful completion, the title will be provided a [`OnLobbyMemberAdded`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbyMemberAdded) followed by a [`OnLobbyUpdated`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbyUpdated) and [`OnLobbyJoinCompleted`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbyJoinCompleted) with the `OnLobbyJoinCompleted.result` field set to [`Success`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyError/Success). Upon a failed completion, the title will be provided a [`OnLobbyJoinCompleted`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbyJoinCompleted) with the `result` field set to a failure.

***

## Method (2 of 2)

Join a lobby as the local PlayFab entity.

```csharp theme={null}
public static Lobby JoinLobby(PlayFabAuthenticationContext newMember, string connectionString, 
    IDictionary<string, string> memberKeyValuePairs)
```

| parameter | description |
| - | - |
| newMember | The local entity joining the lobby. |
| connectionString | The connection string used by the entity to join the lobby. |
| memberKeyValuePairs | The number of initial member properties for the joiner of the lobby. |

## Return Value (2 of 2)

Output lobby object which can be used to queue operations for immediate execution of this operation.

## Remarks (2 of 2)

This is an asynchronous operation. Upon successful completion, the title will be provided a [`OnLobbyMemberAdded`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbyMemberAdded) followed by a [`OnLobbyUpdated`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbyUpdated) and [`OnLobbyJoinCompleted`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbyJoinCompleted) with the `OnLobbyJoinCompleted.result` field set to [`Success`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyError/Success). Upon a failed completion, the title will be provided a [`OnLobbyJoinCompleted`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbyJoinCompleted) with the `result` field set to a failure.

## See Also

* class [Lobby](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/Lobby/overview.md)
* class [PFEntityKey](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PFEntityKey/overview.md)
* class [PlayFabMultiplayer](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/overview.md)
* namespace [PlayFab.Multiplayer](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference.md)


## Related topics

- [PlayFabMultiplayer.PlayFabMultiplayerServer.JoinLobbyAsServer method](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer.PlayFabMultiplayerServer/JoinLobbyAsServer.md)
- [PlayFabMultiplayer.OnLobbyJoinCompleted](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbyJoinCompleted.md)
- [PlayFabMultiplayer.JoinArrangedLobby](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/JoinArrangedLobby.md)
- [PlayFabMultiplayer.CreateAndJoinLobby](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/CreateAndJoinLobby.md)
- [PlayFabMultiplayer.OnLobbyJoinArrangedLobbyCompleted](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbyJoinArrangedLobbyCompleted.md)
