Skip to content

Latest commit

 

History

History
130 lines (96 loc) · 4.54 KB

File metadata and controls

130 lines (96 loc) · 4.54 KB
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

Restart synchronizationJob

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]

Permissions

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]

HTTP Request

{servicePrincipalId} refers to the id of the service principal object.

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

Request headers

Name Type Description
Authorization string Bearer {token}. Required. Learn more about authentication and authorization.

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 doesn't return anything in the response body.

Example

Request

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]


Response

The following example shows the response.

HTTP/1.1 204 No Content