Restart synchronizationJob

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Restart the synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing synchronization state and previous errors.

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) Directory.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Application.ReadWrite.OwnedBy, Directory.ReadWrite.All

HTTP Request

POST /servicePrincipals/{id}/synchronization/jobs/{jobId}/restart

Request headers

Name Type Description
Authorization string Bearer {token}. Required.

Request body

In the request body, provide a JSON object with the following parameter.

Parameter Type Description
criteria synchronizationJobRestartCriteria Restart criteria

Response

If successful, returns a 204 No Content response. It does not return anything in the response body.

Example

Request

The following is an example of a request.

POST https://graph.microsoft.com/beta/servicePrincipals/{id}/synchronization/jobs/{jobId}/restart
Authorization: Bearer <token>
Content-type: application/json

{
   "criteria": {
       "resetScope": "Watermark, Escrows, QuarantineState"
   }
}
Response

The following is an example of a response.

HTTP/1.1 204 No Content