Редактиране

Споделяне чрез


Use Postman to try the Microsoft Graph connectors API

The Microsoft Graph Postman collection includes sample requests for the connectors API. Developers can use Postman to try the API without writing any code.

Prerequisites

Connectors API requests are located in the Application -> Graph Connectors folder.

Screenshot of the My Workspace section in Postman, showing the Microsoft Graph collection forked

Create a new connection

Find the Create connection sample request in the Connection setup folder. Use this sample request to create a new connection. The Connection setup folder also contains other sample requests for managing connections.

Register connection schema

Find the Register schema sample request in the Connection setup -> Manage schema folder. Use this sample request to register a schema for the connection you created. This request returns a response that looks like the following.

HTTP/1.1 202 Accepted
Location: https://graph.microsoft.com/v1.0/external/connections/sampleConnectionId/operations/616bfeed-666f-4ce0-8cd9-058939010bfc

Registering a schema is an asynchronous operation. The URL returned in the Location header should be polled for the status of this operation until the status is completed. Find the Get operation status sample request in the Connection setup folder. Replace the request URL with the value in the Location header and send the request to check status. This request returns a response that looks like the following.

HTTP/1.1 200 OK
Content-type: application/json

{
    "id": "616bfeed-666f-4ce0-8cd9-058939010bfc",
    "name": "Sample connection",
    "status": "inprogress",
    "error": null
}

Resend the request until the status property is set to completed. Wait at least one minute between resending this request.

The Manage schema folder also contains other sample requests for managing connections.

Add external group member (optional)

If your external service uses non-Microsoft Entra ID access control lists (ACLs), sync those permissions. External groups (along with Microsoft Entra ID users and groups) are used to set permissions on externalItems added to a Microsoft Graph connection. For details, see externalGroup.

Sample requests for creating external groups and adding members are located in the Identity Sync folder.

Ingest items

Note

Do not ingest items into the connection until the connection schema is in the completed state.

Find the Put item sample request in the Content sync folder. Use this sample request to ingest an item. The Content sync folder also contains other sample requests for managing items.

Error handling

For details about how to resolve errors, see Resolve Microsoft Graph authorization errors.