UserActivity.ReadWrite.CreatedByApp
Allows the app to read and report the signed-in user's activity in the app.
Permission Details
Read and write app activity to users' activity feed
Allows the app to read and report the signed-in user's activity in the app.
47607519-5fb1-47d9-99c7-da4b48f369b1
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
activationUrl |
string |
Required. URL used to launch the activity in the best native experience represented by the appId. Might launch a web-based app if no native app exists. |
activitySourceHost |
string |
Required. URL for the domain representing the cross-platform identity mapping for the app. Mapping is stored either as a JSON file hosted on the domain or configurable via Windows Dev Center. The JSON file is named cross-platform-app-identifiers and is hosted at root of your HTTPS domain, either at the top level domain or include a sub domain. For example: https://contoso.com or https://myapp.contoso.com but NOT https://myapp.contoso.com/somepath. You must have a unique file and domain (or sub domain) per cross-platform app identity. For example, a separate file and domain is needed for Word vs. PowerPoint. |
appActivityId |
string |
Required. The unique activity ID in the context of the app - supplied by caller and immutable thereafter. |
appDisplayName |
stringNullable |
Optional. Short text description of the app used to generate the activity for use in cases when the app is not installed on the user’s local device. |
contentInfo |
object |
Optional. A custom piece of data - JSON-LD extensible description of content according to schema.org syntax. |
contentUrl |
stringNullable |
Optional. Used in the event the content can be rendered outside of a native or web-based app experience (for example, a pointer to an item in an RSS feed). |
createdDateTime |
date-timeNullable |
Set by the server. DateTime in UTC when the object was created on the server. |
expirationDateTime |
date-timeNullable |
Set by the server. DateTime in UTC when the object expired on the server. |
fallbackUrl |
stringNullable |
Optional. URL used to launch the activity in a web-based app, if available. |
historyItems |
activityHistoryItem collection |
Optional. NavigationProperty/Containment; navigation property to the activity's historyItems. |
id |
string |
The unique identifier for an entity. Read-only. |
lastModifiedDateTime |
date-timeNullable |
Set by the server. DateTime in UTC when the object was modified on the server. |
status |
object |
Set by the server. A status code used to identify valid objects. Values: active, updated, deleted, ignored. |
userTimezone |
stringNullable |
Optional. The timezone in which the user's device used to generate the activity was located at activity creation time; values supplied as Olson IDs in order to support cross-platform representation. |
visualElements |
visualInfo |
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"activationUrl": "String",
"activitySourceHost": "String",
"appActivityId": "String",
"appDisplayName": "String",
"contentInfo": {
"sample": "value"
},
"contentUrl": "String",
"createdDateTime": "2026-01-01T00:00:00Z",
"expirationDateTime": "2026-01-01T00:00:00Z",
"fallbackUrl": "String",
"historyItems": [
{
"@type": "activityHistoryItem",
"id": "00000000-0000-0000-0000-000000000000"
}
],
"id": "String",
"lastModifiedDateTime": "2026-01-01T00:00:00Z",
"status": {
"sample": "value"
},
"userTimezone": "String",
"visualElements": {
"@type": "visualInfo",
"id": "00000000-0000-0000-0000-000000000000"
}
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
historyItems |
activityHistoryItem collection |
Optional. NavigationProperty/Containment; navigation property to the activity's historyItems. |
visualElements |
visualInfo |
Related visualElements data exposed by this resource. |
Graph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Code Examples
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Me.Activities["{userActivity-id}"].DeleteAsync();
const options = {
authProvider,
};
const client = Client.init(options);
const userActivity = {
activitySourceHost: 'https://contoso.com',
createdDateTime: '2017-06-09T20:54:43.969Z',
lastModifiedDateTime: '2017-06-09T20:54:43.969Z',
id: '14332800362997268276',
appActivityId: '/article?12345',
status: 'updated',
expirationDateTime: '2017-02-26T20:20:48.114Z',
visualElements: {
displayText: 'Contoso How-To: How to Tie a Reef Knot',
description: 'How to Tie a Reef Knot. A step-by-step visual guide to the art of nautical knot-tying.',
attribution: {
iconUrl: 'https://www.contoso.com/icon',
alternateText: 'Contoso Ltd',
addImageQuery: false
},
backgroundColor: '#ff0000',
content: {
'$schema': 'https://adaptivecards.io/schemas/adaptive-card.json',
type: 'AdaptiveCard',
body: [
{
type: 'TextBlock',
text: 'Contoso MainPage'
}
]
}
},
activationUrl: 'https://www.contoso.com/article?id=12345'
};
await client.api('/me/activities/3F12345')
.put(userActivity);
Import-Module Microsoft.Graph.CrossDeviceExperiences
# A UPN can also be used as -UserId.
Remove-MgUserActivity -UserId $userId -UserActivityId $userActivityId
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
await graph_client.me.activities.by_user_activity_id('userActivity-id').delete()
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Delegated permissions and search for UserActivity.ReadWrite.CreatedByApp
Grant Admin Consent
Users can consent to this permission during sign-in.