| title | Create synchronizationJob |
|---|---|
| description | Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. |
| ms.localizationpriority | medium |
| doc_type | apiPageType |
| author | ArvindHarinder1 |
| ms.subservice | entra-applications |
| ms.date | 06/21/2024 |
Namespace: microsoft.graph
Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization.
[!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]
POST /servicePrincipals/{id}/synchronization/jobs/| Name | Type | Description |
|---|---|---|
| Authorization | string | Bearer {token}. Required. Learn more about authentication and authorization. |
In the request body, supply a JSON representation of the synchronizationJob object to be created. The only required property is templateId. The templateId property must match one of the templates created for this application/service principal. To find available templates, use List templates.
If successful, returns a 201 Created response code and a synchronizationJob object in the response body.
The following example shows a request.
POST https://graph.microsoft.com/v1.0/servicePrincipals/{id}/synchronization/jobs
Content-type: application/json
{
"templateId": "BoxOutDelta"
}[!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.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"id": "{jobId}",
"templateId": "BoxOutDelta",
"schedule": {
"expiration": null,
"interval": "P10675199DT2H48M5.4775807S",
"state": "Disabled"
},
"status": {
"countSuccessiveCompleteFailures": 0,
"escrowsPruned": false,
"synchronizedEntryCountByType": [],
"code": "NotConfigured",
"lastExecution": null,
"lastSuccessfulExecution": null,
"lastSuccessfulExecutionWithExports": null,
"steadyStateFirstAchievedTime": "0001-01-01T00:00:00Z",
"steadyStateLastAchievedTime": "0001-01-01T00:00:00Z",
"quarantine": null,
"troubleshootingUrl": null
}
}