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

# XblPresenceSetPresenceAsync

> XblPresenceSetPresenceAsync

# XblPresenceSetPresenceAsync

Sets presence info for the current user context.

## Syntax

```cpp theme={null}
HRESULT XblPresenceSetPresenceAsync(  
         XblContextHandle xblContextHandle,  
         bool isUserActiveInTitle,  
         XblPresenceRichPresenceIds* richPresenceIds,  
         XAsyncBlock* async  
)  
```

### Parameters

*xblContextHandle*   \_In\_\
Type: [XblContextHandle](/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

XBOX live context for the local user.

*isUserActiveInTitle*   \_In\_\
Type: bool

Indicates if the current user context is currently active or inactive in the title. The application can choose to set this based on an amount of inactivity.

*richPresenceIds*   \_In\_opt\_\
Type: [XblPresenceRichPresenceIds\*](/reference/live/xsapi-c/presence_c/structs/xblpresencerichpresenceids)

Optional pointer to struct which controls the rich presence strings.

*async*   \_In\_\
Type: XAsyncBlock\*

The AsyncBlock for this operation.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Requirements

**Header:** presence\_c.h

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

## See also

[presence\_c](/reference/live/xsapi-c/presence_c/presence_c_members)


## Related topics

- [XblPresenceRichPresenceIds](/reference/live/xsapi-c/presence_c/structs/xblpresencerichpresenceids.md)
- [Updating a user's Presence via XSAPI C](/services/xbox-services/community/presence/how-to/live-updating-user-presence.md)
- [Optional services](/build/gdk-and-engines/optional-services.md)
- [Updating a user's Presence via REST](/services/xbox-services/community/presence/how-to/live-updating-presence-rest.md)
- [XblPresenceGetPresenceAsync](/reference/live/xsapi-c/presence_c/functions/xblpresencegetpresenceasync.md)
