Update schemaExtension

Update properties in the definition of the specified schemaExtension.

The update applies to all the resources that are included in the targetTypes property of the extension. These resources are among the supporting resource types.

Only the app that created a schema extension (owner app) can make additive updates to the extension when the extension is in the InDevelopment or Available status. That means the app cannot remove custom properties or target resource types from the definition. The app can, however, change the description of the extension.

Prerequisites

The following scope is required to execute this API: Directory.AccessAsUser.All

HTTP request

PATCH /schemaExtensions/{id}

Optional request headers

Name Description
Authorization Bearer <token>. Required.
Content-Type application/json

Request body

In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.

Property Type Description
description String Description for the schema extension.
properties extensionSchemaProperty collection The collection of property names and types that make up the schema extension definition. Only additive changes are permitted.
status String The lifecycle state of the schema extension. The initial state upon creation is InDevelopment. Possible states transitions are from InDevelopment to Available, Available to Deprecated and Deprecated to Available.
targetTypes String collection Set of Microsoft Graph types (that can support extensions) that the schema extension can be applied to. Only additive changes are permitted.

Response

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

Example

Request

Here is an example of the request.

PATCH https://graph.microsoft.com/v1.0/schemaExtensions/{id}
Content-type: application/json
Content-length: 201

{
  "properties": [
    {
      "name":"new-name-value",
      "type":"new-type-value"
    },
    {
      "name":"additional-name-value",
      "type":"additional-type-value"
    }
  ],
}
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: 201

{
  "id": "id-value",
  "description": "description-value",
  "targetTypes": [
    "targetTypes-value"
  ],
  "properties": [
    {
      "name":"name-value",
      "type":"type-value"
    },
    {
      "name":"new-name-value",
      "type":"new-type-value"
    },
    {
      "name":"additional-name-value",
      "type":"additional-type-value"
    }  
  ],
  "status": "status-value",
  "owner": "owner-value"
}

See also