Create deviceManagementExchangeConnector

Important: APIs under the /beta version in Microsoft Graph are in preview and are subject to change. Use of these APIs in production applications is not supported.

Note: Using the Microsoft Graph APIs to configure Intune controls and policies still requires that the Intune service is correctly licensed by the customer.

Create a new deviceManagementExchangeConnector by posting to the exchangeConnectors collection.

Prerequisites

One of the following scopes is required to execute this API:

DeviceManagementManagedDevices.ReadWrite.All

HTTP Request

POST /deviceManagement/exchangeConnectors/

Request headers

Header Value
Authorization Bearer {token}. Required.
Accept application/json

Request body

In the request body, supply a JSON representation of a deviceManagementExchangeConnector object. The following table shows the properties that are required when you create a deviceManagementExchangeConnector.

Property Type Description
id String Not yet documented
lastSyncDateTime DateTimeOffset Last sync time for the Exchange Connector
status String Exchange Connector Status Possible values are: connectionPending, connected, disconnected, none.
primarySmtpAddress String Email address used to configure the Service To Service Exchange Connector.
serverName String The name of the server hosting the Exchange Connector.
exchangeConnectorType String The type of Exchange Connector Configured. Possible values are: onPremises, hosted, serviceToService, dedicated.

Response

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

Example

Request

Here is an example of the request.

POST https://graph.microsoft.com/beta/deviceManagement/exchangeConnectors/
Content-type: application/json
Content-length: 292

{
  "@odata.type": "#microsoft.graph.deviceManagementExchangeConnector",
  "lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
  "status": "connected",
  "primarySmtpAddress": "Primary Smtp Address value",
  "serverName": "Server Name value",
  "exchangeConnectorType": "hosted"
}
Response

Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 341

{
  "@odata.type": "#microsoft.graph.deviceManagementExchangeConnector",
  "id": "e11c1de8-1de8-e11c-e81d-1ce1e81d1ce1",
  "lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
  "status": "connected",
  "primarySmtpAddress": "Primary Smtp Address value",
  "serverName": "Server Name value",
  "exchangeConnectorType": "hosted"
}