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

# XblMultiplayerActivityDeleteActivityAsync

> XblMultiplayerActivityDeleteActivityAsync

Clears the multiplayer activity for the local user.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerActivityDeleteActivityAsync(  
         XblContextHandle xblContext,  
         XAsyncBlock* async  
)  
```

### Parameters

*xblContext*   \_In\_\
Type: [XblContextHandle](https://docs.xbox.com/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

XBOX Live context for the local user.

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

The `XAsyncBlock` for this operation.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

Titles should delete the activity for a user as soon as they leave the multiplayer activity. \
\
&#x20;If the title does not delete a user's activity, it is automatically cleared by a presence check. \
\
&#x20;To get the result of the asynchronous operation, call [XAsyncGetStatus](https://docs.xbox.com/reference/system/xasync/functions/xasyncgetstatus.md) inside the `XAsyncBlock` callback or after `XAsyncBlock` is complete. \
\
&#x20;To see how this function is used, see "Deleting an activity" in the [Activities](https://docs.xbox.com/services/xbox-services/multiplayer/mpa/how-to/live-mpa-client-how-to.md#activities) section of [Example code for Multiplayer Activity](https://docs.xbox.com/services/xbox-services/multiplayer/mpa/how-to/live-mpa-client-how-to.md). \
\
&#x20;For more information about multiplayer activities, see [Activities](https://docs.xbox.com/services/xbox-services/multiplayer/mpa/concepts/live-mpa-activities.md).

## REST Call

Calls DELETE `/titles/{titleId}/users/{xuid}/activites`

## Requirements

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

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

## See also

[multiplayer\_activity\_c](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_activity_c/multiplayer_activity_c_members.md)


## Related topics

- [Example code for Multiplayer Activity](https://docs.xbox.com/services/xbox-services/multiplayer/mpa/how-to/live-mpa-client-how-to.md)
- [multiplayer_activity_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_activity_c/multiplayer_activity_c_members.md)
- [Moving from MPSD to PlayFab Multiplayer and MPA](https://docs.xbox.com/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
- [XblMultiplayerActivityGetActivityAsync](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_activity_c/functions/xblmultiplayeractivitygetactivityasync.md)
- [XblMultiplayerActivitySetActivityAsync](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_activity_c/functions/xblmultiplayeractivitysetactivityasync.md)
