schemaExtension resource type (schema extensions)
Namespace: microsoft.graph
Schema extensions allow you to define a schema to extend and add strongly-typed custom data to a resource type. The custom data appears as a complex type on the extended resource. Schema extensions are supported by the following resource types:
- user
- group
- administrativeUnit
- application
- contact
- device
- event (for both user and group calendars)
- message
- organization
- post
Use this resource and associated methods to manage the schema extension definitions. To manage the schema extension data on the extended resource instance, use the same REST request that you use to manage the resource instance. See the schema extension example to learn how to add custom data to groups.
For more information about Microsoft Graph extensibility including limits for schema extensions, see Add custom properties to resources using extensions.
Methods
Method | Return Type | Description |
---|---|---|
Create | schemaExtension | Create a schema extension definition and its associated schema extension property. |
List | schemaExtension | List the available schemaExtension definitions and their properties. |
Get | schemaExtension | Read the properties of a specific schemaExtension definition. |
Update | schemaExtension | Update a schemaExtension definition. Use this operation to update the description, status, target types, or add more properties to the schema extension definition. |
Delete | None | Delete a schemaExtension definition. |
Properties
Property | Type | Description |
---|---|---|
description | String | Description for the schema extension. Supports $filter (eq ). |
id | String | The unique identifier for the schema extension definition. You can assign a value in one of two ways:
$filter (eq ). Note: We recommend that your id starts with an alphabetic letter between A-Z because query capabilities might be limited for IDs that begin with integers. Supports $filter (eq ). |
owner | String | 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:
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 | extensionSchemaProperty collection | The collection of property names and types that make up the schema extension definition. |
status | String | 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 | String collection | 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. |
Schema extensions lifecycle
When your app creates a schema extension definition, the app is marked as the owner of that schema extension.
The owner app can move the extension through different states of a lifecycle, using a PATCH operation on its status property. Depending on the current state, the owner app may be able to update or delete the extension. Any updates to a schema extension should always only be additive and non-breaking.
State | Lifecycle state behavior |
---|---|
InDevelopment |
|
Available |
|
Deprecated |
|
Note
Schema extension definitions (marked as Available
) created by other developers from other tenants are visible to all developers (by listing all schema extensions). This is different from other APIs that only return tenant-specific data. On the other hand, extension data created based on schema extension definitions, is tenant-specific and can only be accessed by apps explicitly granted permission.
JSON representation
The following JSON representation shows the resource type.
{
"description": "String",
"id": "String (identifier)",
"owner": "String",
"properties": [{"@odata.type": "microsoft.graph.extensionSchemaProperty"}],
"status": "String",
"targetTypes": ["String"]
}