Create externalConnection

Namespace: microsoft.graph.externalConnectors

Create a new externalConnection object.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Not applicable
Delegated (personal Microsoft account) Not applicable
Application ExternalConnection.ReadWrite.OwnedBy

HTTP request

POST /external/connections

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the externalConnection object.

You can specify the following properties when creating an externalConnection.

Property Type Description
id String The connection ID. Required.
name String The connection name. Required.
description String The connection description. Required.
configuration microsoft.graph.externalConnectors.configuration The connection configurations. Optional.

Response

If successful, this method returns a 201 Created response code and an externalConnection object in the response body.

Examples

Request

POST https://graph.microsoft.com/v1.0/external/connections
Content-Type: application/json

{
  "id": "contosohr",
  "name": "Contoso HR",
  "description": "Connection to index Contoso HR system"
}

Response

The following is an example of the response.

HTTP/1.1 200 Created
Content-Type: application/json

{
  "id": "0a4f4e74-4e74-0a4f-744e-4f0a744e4f0a",
  "name": "String",
  "description": "String",
  "state": "ready",
  "configuration": {
    "authorizedAppIds": [
      "d310d35d-72ec-47dd-92f2-fb9c40936555"
    ]
  }
}