Microsoft Graph Schema Extensions

Microsoft Graph schema extensions let you add your own strongly typed fields to Microsoft 365 resources—such as users, groups, messages, events, devices, and more—so your application’s data can live alongside Microsoft data and be accessed through the same Graph APIs.

OpenAPI Specification

schemaextensions-openapi-original.yml Raw ↑
openapi: 3.1.0
info:
  title: Microsoft Graph Schemaextensions
  description: Needs a description.
paths:
  /schemaExtensions:
    description: Provides operations to manage the collection of schemaExtension entities.
    get:
      tags:
        - schemaExtensions.schemaExtension
      summary: Microsoft Graph List schemaExtensions
      description: >-
        Get a list of schemaExtension objects in your tenant. The schema
        extensions can be InDevelopment, Available, or Deprecated and includes
        schema extensions:
      externalDocs:
        description: Find more info here
        url: >-
          https://learn.microsoft.com/graph/api/schemaextension-list?view=graph-rest-1.0
      operationId: schemaExtensions.schemaExtension.ListSchemaExtension
      parameters:
        - $ref: '#/components/parameters/top'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/filter'
        - $ref: '#/components/parameters/count'
        - name: $orderby
          in: query
          description: Order items by property values
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
        - name: $select
          in: query
          description: Select properties to be returned
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
        - name: $expand
          in: query
          description: Expand related entities
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
      responses:
        2XX:
          $ref: >-
            #/components/responses/microsoft.graph.schemaExtensionCollectionResponse
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-pageable:
        nextLinkName: '@odata.nextLink'
        operationName: listMore
      x-ms-docs-operation-type: operation
    post:
      tags:
        - schemaExtensions.schemaExtension
      summary: Microsoft Graph Create schemaExtension
      description: "Create a new schemaExtension definition and its associated schema extension property to extend a supporting resource type. Schema extensions let you add strongly-typed custom data to a resource. The app that creates a schema extension is the owner app. Depending on the \r\nstate of the extension, the owner app, and only the owner app, may update or delete the extension.  See examples of how to define a schema extension that describes a training course, \r\nuse the schema extension definition to create a new group with training course data, and \r\nadd training course data to an existing group."
      externalDocs:
        description: Find more info here
        url: >-
          https://learn.microsoft.com/graph/api/schemaextension-post-schemaextensions?view=graph-rest-1.0
      operationId: schemaExtensions.schemaExtension.CreateSchemaExtension
      requestBody:
        description: New entity
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.schemaExtension'
        required: true
      responses:
        2XX:
          description: Created entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.schemaExtension'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /schemaExtensions/{schemaExtension-id}:
    description: Provides operations to manage the collection of schemaExtension entities.
    get:
      tags:
        - schemaExtensions.schemaExtension
      summary: Microsoft Graph Get schemaExtension
      externalDocs:
        description: Find more info here
        url: >-
          https://learn.microsoft.com/graph/api/schemaextension-get?view=graph-rest-1.0
      operationId: schemaExtensions.schemaExtension.GetSchemaExtension
      parameters:
        - name: $select
          in: query
          description: Select properties to be returned
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
        - name: $expand
          in: query
          description: Expand related entities
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
      responses:
        2XX:
          description: Retrieved entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.schemaExtension'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    patch:
      tags:
        - schemaExtensions.schemaExtension
      summary: Microsoft Graph Update schemaExtension
      description: >-
        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.
      externalDocs:
        description: Find more info here
        url: >-
          https://learn.microsoft.com/graph/api/schemaextension-update?view=graph-rest-1.0
      operationId: schemaExtensions.schemaExtension.UpdateSchemaExtension
      requestBody:
        description: New property values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.schemaExtension'
        required: true
      responses:
        2XX:
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.schemaExtension'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    delete:
      tags:
        - schemaExtensions.schemaExtension
      summary: Microsoft Graph Delete schemaExtension
      description: >-
        Delete the definition of a schema extension. Only the app that created
        the schema extension (owner app) can delete the schema extension
        definition, and only when the extension is in the InDevelopment state.
        Deleting a schema extension definition does not affect accessing custom
        data that has been added to resource instances based on that definition.
      externalDocs:
        description: Find more info here
        url: >-
          https://learn.microsoft.com/graph/api/schemaextension-delete?view=graph-rest-1.0
      operationId: schemaExtensions.schemaExtension.DeleteSchemaExtension
      parameters:
        - name: If-Match
          in: header
          description: ETag
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    parameters:
      - name: schemaExtension-id
        in: path
        description: The unique identifier of schemaExtension
        required: true
        schema:
          type: string
        x-ms-docs-key-type: schemaExtension
  /schemaExtensions/$count:
    description: Provides operations to count the resources in the collection.
    get:
      tags:
        - schemaExtensions.schemaExtension
      summary: Microsoft Graph Get the number of the resource
      operationId: schemaExtensions.GetCount-e324
      parameters:
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/filter'
      responses:
        2XX:
          $ref: '#/components/responses/ODataCountResponse'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
components:
  schemas:
    microsoft.graph.schemaExtension:
      allOf:
        - $ref: '#/components/schemas/microsoft.graph.entity'
        - title: schemaExtension
          required:
            - '@odata.type'
          type: object
          properties:
            description:
              type: string
              description: Description for the schema extension.
              nullable: true
            owner:
              type: string
              description: >-
                The appId of the application that is the owner of the schema
                extension. The owner of the schema definition must be explicitly
                specified during the Create and Update operations, or it will be
                implied and auto-assigned by Microsoft Entra ID as follows: In
                delegated access: The signed-in user must be the owner of the
                app that calls Microsoft Graph to create the schema extension
                definition.  If the signed-in user isn't the owner of the
                calling app, they must explicitly specify the owner property,
                and assign it the appId of an app that they own. In app-only
                access:  The owner property isn't required in the request body.
                Instead, the calling app is assigned ownership of the schema
                extension. So, for example, if creating a new schema extension
                definition using Graph Explorer, you must supply the owner
                property. Once set, this property is read-only and cannot be
                changed. Supports $filter (eq).
            properties:
              type: array
              items:
                $ref: '#/components/schemas/microsoft.graph.extensionSchemaProperty'
              description: >-
                The collection of property names and types that make up the
                schema extension definition.
            status:
              type: string
              description: >-
                The lifecycle state of the schema extension. Possible states are
                InDevelopment, Available, and Deprecated. Automatically set to
                InDevelopment on creation. For more information about the
                possible state transitions and behaviors, see Schema extensions
                lifecycle. Supports $filter (eq).
            targetTypes:
              type: array
              items:
                type: string
              description: >-
                Set of Microsoft Graph types (that can support extensions) that
                the schema extension can be applied to. Select from
                administrativeUnit, contact, device, event, group, message,
                organization, post, todoTask, todoTaskList, or user.
            '@odata.type':
              type: string
      x-ms-discriminator-value: '#microsoft.graph.schemaExtension'
  parameters:
    top:
      name: $top
      in: query
      description: Show only the first n items
      style: form
      explode: false
      schema:
        minimum: 0
        type: integer
      example: 50
    skip:
      name: $skip
      in: query
      description: Skip the first n items
      style: form
      explode: false
      schema:
        minimum: 0
        type: integer
    search:
      name: $search
      in: query
      description: Search items by search phrases
      style: form
      explode: false
      schema:
        type: string
    filter:
      name: $filter
      in: query
      description: Filter items by property values
      style: form
      explode: false
      schema:
        type: string
    count:
      name: $count
      in: query
      description: Include count of items
      style: form
      explode: false
      schema:
        type: boolean
  examples: {}
  responses:
    error:
      description: error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/microsoft.graph.ODataErrors.ODataError'
    ODataCountResponse:
      description: The count of the resource
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/ODataCountResponse'
tags:
  - name: schemaExtensions.schemaExtension