Overview Of Microsoft Graph Open Extensions And Schema Extensions

What is Microsoft Graph Extensions?

It allows you to extend the graph API resources to save the data of your application. You can add the custom properties of Microsoft graph resources like users and messages. You can define custom schema and maintain the application data in graph API which meets the schema requirements. It avoids the overhead of maintaining data in two different data stores.

Microsoft Graph offers two types of extensions

  • Open Extensions: Helps to add untyped data to Graph resources.
  • Schema Extensions: Help to define a schema and extend the resource type.

Note. Don’t use extensions to store sensitive information like credentials, banking details, or government identity-related details.

Why do we need Microsoft Graph Extension?

Let’s assume you have an application where you need to save some user-specific data like user theme color or user-specific settings.

Here you will be saving user-specific data in your custom database and user profile details from Active Directory. Managing data in two different data stores is a headache, right?

What if you can manage the user-centric data in Graph API itself?

What if you can get your application data along with Graph results itself?

It eases the overload in managing data in the single data store and gets it using Graph API calls.

Supported resources where Microsoft Graph Extensions is generally available.

Supported resources where Microsoft Graph Extensions is in Preview.

All the above-mentioned resources are supported in work or school accounts.

Below are the resources that you can use for graphs with personal accounts.

  • Event
  • Post
  • Group
  • Message
  • Contact
  • User

What permissions are needed to use Microsoft Graph Extension?

You don’t need any additional permission to use Open Extension, the same permission that is needed for the resource is enough to use Open Extension.

But to manage schema extension the application must be granted Directory.AccessAsUser.All permission.

Limitations in Microsoft Graph Extension

  • Directory resources like User, Group, and Device can have up to 2KB of data.
  • Maximum 2 open extensions are allowed per resource instance.
  • Extensions for Outlook resources like Messages, events, and contacts are stored in the MAPI property of the user’s mailbox which is a limited resource.
  • Maximum 5 schema extension definitions can be created by an application.
  • Change tracking using Delta Query is not supported for extension properties.
  • Open extensions are not possible to add along with resources while creating resources like device/group/user. First, create a resource and make a separate API call to add the extension to the entity.
  • Schema extensions are not possible to add while creating resources. First, create the resource then add the schema, and then add the data.
  • A maximum of 100 extension properties are allowed in schema extension.
  • Filtering of data based on schema extension properties is not supported for outlook entity types like contact, event, message, or post.

Conclusion

I hope this article helps you to understand Microsoft Graph Extensions, its purpose, and its limitations. If you have any questions/issues about this article, please let me know in the comments.


Similar Articles