Use the Microsoft Graph connectors API
You can use Microsoft Graph connectors to bring data from external services into Microsoft Graph. The Microsoft Graph connectors API enables you to index external data in order to power intelligent experiences in Microsoft 365, such as Copilot and Microsoft Search.
Requests to index data are performed on behalf of an application without the presence of a signed-in user via an access token with application permission.
Build a custom Microsoft Graph connector
Building a custom Microsoft Graph connector involves four steps:
- Create an Entra ID (formerly known as Azure Active Directory) app registration. Along with the request to Microsoft Graph, you submit the name of the app registration and API permissions that your app needs. Microsoft Graph responds with information about the newly created app registration.
- Create an external connection. Each connection requires a unique ID, name, and a description.
- Create the schema for the external connection. The schema defines the shape of external content that you'll ingest through this Microsoft Graph connection. Creating the schema is a long-running operation. After you submit the schema to create the connection, Microsoft Graph responds with a URL that you can use to check the status of the operation. The schema is being provisioned as long as the operation status is
inprogress
. When provisioning completes, the operation will return acompleted
status. - Ingest external content. For each external item, extract it from the source content repository, transform it so that it matches the schema for your external connection, and submit it to Microsoft Graph as an external item. Along with the item, include information about who's allowed to access it, also known as the access control list (ACL).
The following is a sequence diagram that illustrates the four steps to build a Microsoft Graph connector.
Common use cases
The following table lists common use cases for the Microsoft Graph connectors API.
Use cases | REST resources | See also |
---|---|---|
Configuration actions | ||
Create, update, or delete a connection | externalConnection | externalConnection methods |
Register a schema for the external data | schema | schema methods |
Indexing actions | ||
Add, update or delete a custom item in the index | externalItem | externalItem methods |
Known limitations
The following are current known limitations:
- Organizations are limited to a maximum of 30 connections. (If you need more connections, complete the Request form.)
- You can create up to 25
externalItem
resources items per second. - An application is limited to 25 concurrent operations on a connection.
- Connections have a capacity limit of 5,000,000 items or ~350 GB of data.
- Maximum size of an
externalItem
entity is 4 MB.
Next steps
- See the Microsoft Search API overview.
- Drill down on the methods, properties, and relationships of the externalConnection, schema, and externalItem resources.
- Check out the Microsoft Graph postman collection (learn more)
- Check out the sample search connector from GitHub.