It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to programmatically trigger synchronization with Active Directory?


Using a post-function, I would like to trigger synchronization of Jira with Active Directory (or any User Directory). 

Is there a way to do so?


1 answer

Hello Alexis,

Thank you for reaching out.

I understand that you would like to sync your users in your Active directory together with your JIRA Application. Is it correct?

Please, allow me to bring you some concepts so we can confirm we are on the same page here:

Post functions are related to JIRA issues. Basically, they are used to automate issue actions and updates when performing a specific JIRA transition, as mentioned in the documentation below:

Advanced workflow configuration 

That being said, Post functions are used to update JIRA issues, not users.

To sync your Local Active Directory (LDAP) with JIRA, you can simply follow the steps below: 

  1. hoose  > User Management
  2. Choose User Directories.
  3. Add a directory and select one of these types:
    • 'Microsoft Active Directory' – This option provides a quick way to select AD, because it is the most popular LDAP directory type.
    • 'LDAP' – You will be able to choose a specific LDAP directory type on the next screen.
  4. Enter the values for the settings, as described below.
  5. Save the directory settings.
  6. Define the directory order by clicking the blue up- and down-arrows next to each directory on the 'User Directories' screen. Here is a summary of how the directory order affects the processing:
    • The order of the directories is the order in which they will be searched for users and groups.
    • Changes to users and groups will be made only in the first directory where the application has permission to make changes.
    For details, see Managing multiple directories.

For more details about how the sync works, please check the notification below:

Connecting to an LDAP directory 

Let me know if this makes sense and if you are using a different time of Active Directory.


I know this request may seem strange.  Let me elaborate.

One of our customer has a workflow for user creation in their system. During this process, they want to automate Jira sync with their AD without having to go themselves in the user directory management page, and without setting a sync timer too small (to avoid spamming their ad server with requests.

So basically, when the issue tracking the user creation reaches the "User created" status, they want a post function to trigger the sync so the user can be added after that to a user picker field and used in other actions in the workflow.

We would like to use a scripted post function to perform this action. So we need either the REST endpoint (I don't think it exists) or the java code to do this sync programmatically. Or maybe we could use a service?  I know it is possible to trigger the run of a service in Jira with a little java code, so if the service is about sync of the user directories, this would do the trick.


Is it clearer this way?

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you