Test Exchange Connection

Prev Next
Post
/api/v1/exchange.testConnection
Premium tag

Test whether Rocket.Chat can connect to Microsoft Exchange with the workspace Microsoft Exchange server-to-server settings.

Requires the outlook-calendar license module and the test-admin-options permission. Server-to-server sync must be enabled (Outlook_Calendar_Enabled on and Integration mode set to server-to-server).

Changelog

Version Description
9.1.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Responses
200

OK

Example 1
{
  "provider": "ews",
  "message": "Exchange_Test_Connection_successful",
  "success": true
}
object
provider
string

The configured Exchange sync provider. Either ews or graph.

message
string
success
boolean
400

Bad Request

Server Sync Disabled
{
  "success": false,
  "error": "Exchange_Server_Sync_Disabled"
}
Not Configured
{
  "success": false,
  "error": "Exchange_Test_Connection_not_configured"
}
Authentication Failed
{
  "success": false,
  "error": "Exchange_Test_Connection_authentication_failed"
}
Authorization Failed
{
  "success": false,
  "error": "Exchange_Test_Connection_authorization_failed"
}
Mailbox Not Found
{
  "success": false,
  "error": "Exchange_Test_Connection_mailbox_not_found"
}
Connection Failed
{
  "success": false,
  "error": "Exchange_Test_Connection_connection_failed"
}
Host Not Allowed
{
  "success": false,
  "error": "Exchange_Test_Connection_host_not_allowed"
}
NTLM Unavailable
{
  "success": false,
  "error": "Exchange_Test_Connection_ntlm_unavailable"
}
Endpoint Not Recognized
{
  "success": false,
  "error": "Exchange_Test_Connection_endpoint_not_recognized"
}
Rate Limited
{
  "success": false,
  "error": "Exchange_Test_Connection_rate_limited"
}
License Required
{
  "success": false,
  "error": "This is an enterprise feature [error-action-not-allowed]",
  "errorType": "error-action-not-allowed"
}
object
success
boolean
error
string
401

Unauthorized

Authorization Error
{
  "success": false,
  "error": "You must be logged in to do this."
}
object
success
boolean
error
string
403

Forbidden

Permission Error
{
  "success": false,
  "error": "User does not have the permissions required for this action [error-unauthorized]"
}
object
success
boolean
error
string
500

Internal Server Error

Unexpected Response
{
  "success": false,
  "error": "Exchange_Test_Connection_unexpected_response"
}
Sync State Invalid
{
  "success": false,
  "error": "Exchange_Test_Connection_sync_state_invalid"
}
object
success
boolean
error
string