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

# XblMultiplayerManagerJoinGame

> XblMultiplayerManagerJoinGame

# XblMultiplayerManagerJoinGame

Joins a game session, using the globally unique session name.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerManagerJoinGame(  
         const char* sessionName,  
         const char* sessionTemplateName,  
         const uint64_t* xuids,  
         size_t xuidsCount  
)  
```

### Parameters

*sessionName*   \_In\_z\_\
Type: char\*

The globally unique session name for the game session.

*sessionTemplateName*   \_In\_z\_\
Type: char\*

The name of the session template for the game session to be based on.

*xuids*   \_In\_opt\_\
Type: uint64\_t\*

An array of XBOX User IDs (XUIDs) that represents the users you want to be part of the game.

*xuidsCount*   \_In\_\
Type: size\_t

The number of elements in the array specified for `xuids`.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

This function joins a list of XBOX users, specified in `xuids`, to the game session identified by the globally unique session name specified in `sessionName.` You can get the globally unique session name from the results of the title's third-party matchmaking, and you should call this function for all clients that need to join the game. <br />The result of this function is delivered as a multiplayer event with an event type set to `XblMultiplayerEventType::JoinGameCompleted`. You can call [XblMultiplayerManagerDoWork](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerdowork) to retrieve multiplayer events.  <br />When attempting to join a game session, the service returns `HTTP_E_STATUS_BAD_REQUEST` if the server is full.  <br />After joining, you can set the properties for the game session by calling [XblMultiplayerManagerGameSessionSetProperties](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionsetproperties) or [XblMultiplayerManagerGameSessionSetSynchronizedProperties](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionsetsynchronizedproperties), or you can set the host for the game session by calling [XblMultiplayerManagerGameSessionSetSynchronizedHost](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionsetsynchronizedhost).

## Requirements

**Header:** multiplayer\_manager\_c.h

**Library:** Microsoft.Xbox.Services.14x.GDK.C.lib

## See also

[multiplayer\_manager\_c](/reference/live/xsapi-c/multiplayer_manager_c/multiplayer_manager_c_members)


## Related topics

- [XblMultiplayerManagerJoinGameFromLobby](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerjoingamefromlobby.md)
- [XblMultiplayerManagerLeaveGame](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerleavegame.md)
- [XblMultiplayerManagerJoinLobby](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerjoinlobby.md)
- [XblMultiplayerManagerLobbySessionRemoveLocalUser](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionremovelocaluser.md)
- [Multiplayer Manager API overview](/services/xbox-services/multiplayer/mpm/concepts/live-multiplayer-manager-api-overview.md)
