Skip to main content

synchronization_jobs

Creates, updates, deletes, gets or lists a synchronization_jobs resource.

Overview

Namesynchronization_jobs
TypeResource
Identra_id.service_principals.synchronization_jobs

Fields

The following fields are returned by SELECT queries:

Retrieved navigation property

NameDatatypeDescription
idstringThe unique identifier for an entity. Read-only.
bulkUploadThe bulk upload operation for the job.
scheduleSchedule used to run the job. Read-only.
schemaThe synchronization schema configured for the job.
statusStatus of the job, which includes when the job was last run, current job state, and errors.
synchronizationJobSettingsarraySettings associated with the job. Some settings are inherited from the template.
templateIdstringIdentifier of the synchronization template this job is based on.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_principal_id, synchronization_job_idRetrieve the existing synchronization job and its properties.
listselectservice_principal_idList existing jobs for a given application instance (service principal).
insertinsertservice_principal_idCreate new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization.
updateupdateservice_principal_id, synchronization_job_id
deletedeleteservice_principal_id, synchronization_job_idIf-MatchStop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is.
get_bulk_uploadexecservice_principal_id, synchronization_job_idThe bulk upload operation for the job.
update_bulk_uploadexecservice_principal_id, synchronization_job_id
delete_bulk_uploadexecservice_principal_id, synchronization_job_idIf-Match
pauseexecservice_principal_id, synchronization_job_idTemporarily stop a running synchronization job. All the progress, including job state, is persisted, and the job will continue from where it left off when a start call is made.
provision_on_demandexecservice_principal_id, synchronization_job_idSelect a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds.
restartexecservice_principal_id, synchronization_job_idRestart a stopped synchronization job, forcing it to reprocess all the objects in the directory. Optionally clears existing the synchronization state and previous errors.
startexecservice_principal_id, synchronization_job_idStart an existing synchronization job. If the job is in a paused state, it continues processing changes from the point where it was paused. If the job is in quarantine, the quarantine status is cleared. Don't create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine.
validate_credentialsexecservice_principal_id, synchronization_job_idValidate that the credentials are valid in the tenant.
schema_directories_discoverexecservice_principal_id, synchronization_job_id, directory_definition_idDiscover the latest schema definition for provisioning to an application.
schema_parse_expressionexecservice_principal_id, synchronization_job_idParse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID.
validate_credentials_2execservice_principal_id

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
directory_definition_idstringThe unique identifier of directoryDefinition
service_principal_idstringThe unique identifier of servicePrincipal
synchronization_job_idstringThe unique identifier of synchronizationJob
If-MatchstringETag

SELECT examples

Retrieve the existing synchronization job and its properties.

SELECT
id,
bulkUpload,
schedule,
schema,
status,
synchronizationJobSettings,
templateId
FROM entra_id.service_principals.synchronization_jobs
WHERE service_principal_id = '{{ service_principal_id }}' -- required
AND synchronization_job_id = '{{ synchronization_job_id }}' -- required
;

INSERT examples

Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization.

INSERT INTO entra_id.service_principals.synchronization_jobs (
id,
schedule,
status,
synchronizationJobSettings,
templateId,
bulkUpload,
schema,
service_principal_id
)
SELECT
'{{ id }}',
'{{ schedule }}',
'{{ status }}',
'{{ synchronizationJobSettings }}',
'{{ templateId }}',
'{{ bulkUpload }}',
'{{ schema }}',
'{{ service_principal_id }}'
RETURNING
id,
bulkUpload,
schedule,
schema,
status,
synchronizationJobSettings,
templateId
;

UPDATE examples

No description available.

UPDATE entra_id.service_principals.synchronization_jobs
SET
id = '{{ id }}',
schedule = '{{ schedule }}',
status = '{{ status }}',
synchronizationJobSettings = '{{ synchronizationJobSettings }}',
templateId = '{{ templateId }}',
bulkUpload = '{{ bulkUpload }}',
schema = '{{ schema }}'
WHERE
service_principal_id = '{{ service_principal_id }}' --required
AND synchronization_job_id = '{{ synchronization_job_id }}' --required
RETURNING
id,
bulkUpload,
schedule,
schema,
status,
synchronizationJobSettings,
templateId;

DELETE examples

Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is.

DELETE FROM entra_id.service_principals.synchronization_jobs
WHERE service_principal_id = '{{ service_principal_id }}' --required
AND synchronization_job_id = '{{ synchronization_job_id }}' --required
AND If-Match = '{{ If-Match }}'
;

Lifecycle Methods

The bulk upload operation for the job.

EXEC entra_id.service_principals.synchronization_jobs.get_bulk_upload
@service_principal_id='{{ service_principal_id }}' --required,
@synchronization_job_id='{{ synchronization_job_id }}' --required,
@$select='{{ $select }}',
@$expand='{{ $expand }}'
;