Update schemaExtension

Namespace: microsoft.graph

Update properties in the definition of the specified schemaExtension. Additive updates to the extension can only be made when the extension is in the InDevelopment or Available status. This means custom properties or target resource types cannot be removed from the definition, but new custom properties can be added and the description of the extension changed.

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.

For delegated flows, the signed-in user can update a schema extension as long as the owner property of the extension is set to the appId of an application the signed-in user owns. That application can be the one that initially created the extension, or some other application owned by the signed-in user.

This criteria for the owner property allows a signed-in user to make updates through other applications they don't own, such as Microsoft Graph Explorer. When using Graph Explorer to update a schemaExtension resource, include the owner property in the PATCH request body.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) Application.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application Application.ReadWrite.All and Directory.ReadWrite.All Not available.

HTTP request

PATCH /schemaExtensions/{id}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

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 and Available to Deprecated.
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 204 No Content response code. Attempting to run this request from an application which you don't own (and without setting the owner property to the appId of an application you own) returns a 403 Forbidden response code.

Example

Request

The following example shows a request. You must include the owner property if you're running the request from an application which you don't own. In this case, set the owner property to the appId of an application you own.

PATCH https://graph.microsoft.com/v1.0/schemaExtensions/exto6x7sfft_courses
Content-type: application/json

{
    "owner": "ef4cb9a8-97c3-4ca7-854b-5cb5ced376fa",
    "properties": [
        {
            "name": "courseId",
            "type": "Integer"
        },
        {
            "name": "courseName",
            "type": "String"
        },
        {
            "name": "courseType",
            "type": "String"
        },
        {
            "name": "courseSupervisors",
            "type": "String"
        }
    ]
}

Response

HTTP/1.1 204 No Content