Anatomy of a Microsoft Graph connector

Waldek Mastykarz

In our recent post, we introduced Microsoft Graph connectors and how they help bring your organization’s content into Microsoft Graph and Semantic Index for Copilot to appear across Microsoft 365 experiences, making it easy for users in your organization to easily discover and share content relevant to them while staying in the flow of work.

Now, let’s go under the hood to better understand the building blocks of a Microsoft Graph connector.

Key components of a Microsoft Graph connector

First, let’s break things down – Microsoft Graph connectors are responsible for three things:

  1. Creating an external connection to your data sources
  2. Defining schema for the external content
  3. Managing external content that’s imported to Microsoft 365

The following diagram illustrates these responsibilities:

An external connection defines the source of external content that you’ll ingest into Microsoft 365. It contains information such as:

  • Name and description
  • Schema, which is a list of properties that are indexed for the external content
  • External content (referred to as external items) that are imported into Microsoft 365

Each external item contains:

  • Content that’s indexed
  • Metadata that describes the content as defined by the external connection schema (e.g., author of an item; when and by who it was last modified; where the content is located, etc.)
  • Access control list (ACL) that describes who is allowed to see the content
  • Optionally, activities on the content that support its discovery in the different Microsoft 365 experiences

Piecing the building blocks together

In its simplest form, a Microsoft Graph connector consists of a Microsoft Entra app registration, and custom code.

The Microsoft Entra app registration allows the Graph connector to authenticate with Microsoft 365 and call Microsoft Graph APIs. The Graph connector code creates the external connection and configures the schema. Then, regularly it connects to the external data source (1), authenticates with Microsoft Entra ID (2) and uses Microsoft Graph APIs to import the external content to Microsoft 365 (3).

The simplest Microsoft Graph connector could be a PowerShell script built using the Microsoft Graph PowerShell SDK. You run the script once, or regularly, to ingest content from your external source to Microsoft 365.

If you need a more robust solution, capable of handling large volumes of data and incremental crawls, you can build a Microsoft Graph connector as a cloud app using cloud-native building blocks such as serverless, queues and storage.

Because you write the Graph connector’s code responsible for connecting to the external content source, transforming the content to match the external connection’s schema, and loading it to Microsoft 365 using Microsoft Graph APIs, you have the full flexibility of designing the connector so that it matches your specific needs.

Conclusion

You’ve just learned about what makes Microsoft Graph connectors work – the connection, schema and indexing of your external content into Microsoft Graph. We’ll be back soon to continue this series with a thorough walkthrough of how to build a custom Microsoft Graph connector. In the meantime, explore Microsoft Graph connector samples, visit our Microsoft 365 Dev Center, and follow us on Microsoft 365 Developer (@Microsoft365Dev) / X for the latest news and announcements.

Happy coding!

2 comments

Discussion is closed. Login to edit/delete existing comments.

  • Ejaz Hussain 1

    Thanks @Waldek. I am looking forward to the next blog posts on Microsoft Graph Connectors and how to build one

    • Waldek MastykarzMicrosoft employee 1

      Excellent! We’ve got a new article coming out shortly. Looking forward to hearing how you like it

Feedback usabilla icon