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

# XblMultiplayerManagerGameSessionSetProperties

> XblMultiplayerManagerGameSessionSetProperties

# XblMultiplayerManagerGameSessionSetProperties

Sets the value of a custom property for the game session.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerManagerGameSessionSetProperties(  
         const char* name,  
         const char* valueJson,  
         void* context  
)  
```

### Parameters

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

The name of the custom property to set.

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

The value to assign to the property, as a JSON string.

*context*   \_In\_opt\_\
Type: void\*

Optional. The application-defined data to correlate the [XblMultiplayerEvent](/reference/live/xsapi-c/multiplayer_manager_c/structs/xblmultiplayerevent) to the initiating call.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

This function sets the value, represented as a JSON string, of a custom property for the game session. Custom properties can be changed at any time. Changes are batched and written to the service when [XblMultiplayerManagerDoWork](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerdowork) is called. If custom properties are shared between devices, or may be updated by several devices at the same time, use the [XblMultiplayerManagerGameSessionSetSynchronizedProperties](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionsetsynchronizedproperties) function to change custom properties. Otherwise, you can use this function to change custom properties.

## 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)\
[XblMultiplayerManagerGameSessionSetSynchronizedHost](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionsetsynchronizedhost)


## Related topics

- [XblMultiplayerManagerGameSessionPropertiesJson](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionpropertiesjson.md)
- [XblMultiplayerManagerGameSessionSetSynchronizedProperties](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionsetsynchronizedproperties.md)
- [XblMultiplayerManagerJoinGame](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerjoingame.md)
- [Multiplayer Manager API overview](/services/xbox-services/multiplayer/mpm/concepts/live-multiplayer-manager-api-overview.md)
- [XblMultiplayerManagerJoinGameFromLobby](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerjoingamefromlobby.md)
