| title | Restart synchronizationJob |
|---|---|
| description | Restart the synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing synchronization state and previous errors. |
| ms.localizationpriority | medium |
| doc_type | apiPageType |
| author | ArvindHarinder1 |
| ms.subservice | entra-applications |
| ms.date | 03/17/2025 |
Namespace: microsoft.graph
Restart a stopped synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing the synchronization state and previous errors.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
[!INCLUDE rbac-synchronization-apis]
{servicePrincipalId} refers to the id of the service principal object.
POST /servicePrincipals/{servicePrincipalId}/synchronization/jobs/{jobId}/restart| Name | Type | Description |
|---|---|---|
| Authorization | string | Bearer {token}. Required. Learn more about authentication and authorization. |
In the request body, provide a JSON object with the following parameter.
| Parameter | Type | Description |
|---|---|---|
| criteria | synchronizationJobRestartCriteria | Restart criteria |
If successful, returns a 204 No Content response. It doesn't return anything in the response body.
The following example shows a request.
POST https://graph.microsoft.com/v1.0/servicePrincipals/{id}/synchronization/jobs/{jobId}/restart
Authorization: Bearer <token>
Content-type: application/json
{
"criteria": {
"resetScope": "Watermark, Escrows, QuarantineState"
}
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No Content