Skip to main content

Sync users with LDAP

info

The code examples in this article is only documented with the Python API Client. While many concepts still apply for the JavaScript API, implementation details might differ.

If ftrack is configured to connect to LDAP you may trigger a synchronization through the api using the ftrack_api.session.Session.call:

result = session.call([
dict(
action='delayed_job',
job_type='SYNC_USERS_LDAP'
)
])
job = result[0]['data]

You will get a ftrack_api.entity.job.Job instance back which can be used to check the success of the job:

if job.get('status') == 'failed':
# The job failed get the error.
logging.error(job.get('data'))