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

# XblMultiplayerManagerLobbySessionSetProperties

> XblMultiplayerManagerLobbySessionSetProperties

# XblMultiplayerManagerLobbySessionSetProperties

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

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerManagerLobbySessionSetProperties(  
         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 lobby 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 [XblMultiplayerManagerLobbySessionSetSynchronizedProperties](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionsetsynchronizedproperties) function to change custom properties. Otherwise, you can use this function to change custom properties. <br />The result of this function is delivered as a multiplayer event with an event type set to `XblMultiplayerEventType::SessionPropertyWriteCompleted`. You can call [XblMultiplayerManagerDoWork](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerdowork) to retrieve multiplayer events.

## 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)\
[XblMultiplayerManagerLobbySessionSetSynchronizedHost](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionsetsynchronizedhost)\
[XblMultiplayerEvent](/reference/live/xsapi-c/multiplayer_manager_c/structs/xblmultiplayerevent)


## Related topics

- [XblMultiplayerManagerLobbySessionPropertiesJson](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionpropertiesjson.md)
- [XblMultiplayerManagerLobbySessionSetSynchronizedProperties](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionsetsynchronizedproperties.md)
- [Multiplayer Manager API overview](/services/xbox-services/multiplayer/mpm/concepts/live-multiplayer-manager-api-overview.md)
- [Play multiplayer with friends using Multiplayer Manager](/services/xbox-services/multiplayer/mpm/how-to/live-play-multiplayer-with-friends.md)
- [Multiplayer matchmaking with SmartMatch and MPM](/services/xbox-services/multiplayer/mpm/how-to/live-play-multiplayer-with-matchmaking.md)
