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

# 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](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_manager_c/structs/xblmultiplayerevent.md) 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](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerdowork.md) is called. If custom properties are shared between devices, or may be updated by several devices at the same time, use the [XblMultiplayerManagerLobbySessionSetSynchronizedProperties](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionsetsynchronizedproperties.md) function to change custom properties. Otherwise, you can use this function to change custom properties. \
The result of this function is delivered as a multiplayer event with an event type set to `XblMultiplayerEventType::SessionPropertyWriteCompleted`. You can call [XblMultiplayerManagerDoWork](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerdowork.md) to retrieve multiplayer events.

## Requirements

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

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[multiplayer\_manager\_c](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_manager_c/multiplayer_manager_c_members.md)\
[XblMultiplayerManagerLobbySessionSetSynchronizedHost](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionsetsynchronizedhost.md)\
[XblMultiplayerEvent](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_manager_c/structs/xblmultiplayerevent.md)


## Related topics

- [XblMultiplayerManagerLobbySessionPropertiesJson](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionpropertiesjson.md)
- [XblMultiplayerManagerLobbySessionSetSynchronizedProperties](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionsetsynchronizedproperties.md)
- [Multiplayer Manager API overview](https://docs.xbox.com/services/xbox-services/multiplayer/mpm/concepts/live-multiplayer-manager-api-overview.md)
- [Enable playing a multiplayer game with friends by using Multiplayer Manager](https://docs.xbox.com/services/xbox-services/multiplayer/mpm/how-to/live-play-multiplayer-with-friends.md)
- [Enable finding a multiplayer game by using SmartMatch using Multiplayer Manager](https://docs.xbox.com/services/xbox-services/multiplayer/mpm/how-to/live-play-multiplayer-with-matchmaking.md)
