Update 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.

Update the properties of a deviceManagementExchangeConnector object.

Prerequisites

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 most to least privileged)
Delegated (work or school account) DeviceManagementServiceConfig.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP Request

PATCH /deviceManagement/exchangeConnectors/{deviceManagementExchangeConnectorId}

Request headers

Header Value
Authorization Bearer <token> Required.
Accept application/json

Request body

In the request body, supply a JSON representation for the deviceManagementExchangeConnector object.

The following table shows the properties that are required when you create the deviceManagementExchangeConnector.

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

Response

If successful, this method returns a 200 OK response code and an updated deviceManagementExchangeConnector object in the response body.

Example

Request

Here is an example of the request.

PATCH https://graph.microsoft.com/beta/deviceManagement/exchangeConnectors/{deviceManagementExchangeConnectorId}
Content-type: application/json
Content-length: 418

{
  "lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
  "status": "connectionPending",
  "primarySmtpAddress": "Primary Smtp Address value",
  "serverName": "Server Name value",
  "connectorServerName": "Connector Server Name value",
  "exchangeConnectorType": "hosted",
  "version": "Version value",
  "exchangeAlias": "Exchange Alias value",
  "exchangeOrganization": "Exchange Organization value"
}

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 200 OK
Content-Type: application/json
Content-Length: 539

{
  "@odata.type": "#microsoft.graph.deviceManagementExchangeConnector",
  "id": "e11c1de8-1de8-e11c-e81d-1ce1e81d1ce1",
  "lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
  "status": "connectionPending",
  "primarySmtpAddress": "Primary Smtp Address value",
  "serverName": "Server Name value",
  "connectorServerName": "Connector Server Name value",
  "exchangeConnectorType": "hosted",
  "version": "Version value",
  "exchangeAlias": "Exchange Alias value",
  "exchangeOrganization": "Exchange Organization value"
}