Update mobileAppSupersedence

Namespace: microsoft.graph

Important: Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.

Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

Update the properties of a mobileAppSupersedence object.

Prerequisites

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) DeviceManagementApps.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application DeviceManagementApps.ReadWrite.All

HTTP Request

PATCH /deviceAppManagement/mobileApps/{mobileAppId}/relationships/{mobileAppRelationshipId}

Request headers

Header Value
Authorization Bearer <token> Required.
Accept application/json

Request body

In the request body, supply a JSON representation for the mobileAppSupersedence object.

The following table shows the properties that are required when you create the mobileAppSupersedence.

Property Type Description
id String The relationship entity id. Inherited from mobileAppRelationship
targetId String The target mobile app's app id. Inherited from mobileAppRelationship
targetDisplayName String The target mobile app's display name. Inherited from mobileAppRelationship
targetDisplayVersion String The target mobile app's display version. Inherited from mobileAppRelationship
targetPublisher String The target mobile app's publisher. Inherited from mobileAppRelationship
targetType mobileAppRelationshipType The type of relationship indicating whether the target is a parent or child. Inherited from mobileAppRelationship. Possible values are: child, parent.
supersedenceType mobileAppSupersedenceType The supersedence relationship type between the parent and child apps. Possible values are: update, replace.
supersededAppCount Int32 The total number of apps directly or indirectly superseded by the child app.
supersedingAppCount Int32 The total number of apps directly or indirectly superseding the parent app.

Response

If successful, this method returns a 200 OK response code and an updated mobileAppSupersedence object in the response body.

Example

Request

Here is an example of the request.

PATCH https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/{mobileAppId}/relationships/{mobileAppRelationshipId}
Content-type: application/json
Content-length: 375

{
  "@odata.type": "#microsoft.graph.mobileAppSupersedence",
  "targetId": "Target Id value",
  "targetDisplayName": "Target Display Name value",
  "targetDisplayVersion": "Target Display Version value",
  "targetPublisher": "Target Publisher value",
  "targetType": "parent",
  "supersedenceType": "replace",
  "supersededAppCount": 2,
  "supersedingAppCount": 3
}

Response

Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 424

{
  "@odata.type": "#microsoft.graph.mobileAppSupersedence",
  "id": "c0254204-4204-c025-0442-25c0044225c0",
  "targetId": "Target Id value",
  "targetDisplayName": "Target Display Name value",
  "targetDisplayVersion": "Target Display Version value",
  "targetPublisher": "Target Publisher value",
  "targetType": "parent",
  "supersedenceType": "replace",
  "supersededAppCount": 2,
  "supersedingAppCount": 3
}