How to create users in Delegated Authentication directory using JIRA REST API

Still need help?

The Atlassian Community is here for you.

Ask the community


The JIRA REST API can be used to create users as per described here: However, the directory to create users in cannot be specified directly in the POST. We can workaround this by switching directory positions or disabling directories to ensure that JIRA creates the user in the correct directory that we want, as described below. 


JIRA will try to create the user in the top-most and enabled directory.

tip/resting Created with Sketch.

Note that the REST API can only create users in the Default JIRA Internal Directory, or Internal Directory with Delegated Authentication

  1. To check the position of your directories, go to Administration >> User Management >> User Directories
  2. Move the directory that you want users to be created in to the top-most position, OR
  3. Disable the top directories and leave only the directory where you want users to be created in enabled.

Assume that you have 3 directories, in the following order:

  1. Delegated Auth A - Enabled
  2. Default Internal Directory - Enabled
  3. Delegated Auth B - Disabled

To add users to Delegated Auth B you can either disable 1 and 2 and then re-enable 3, or move 3 to the top-most position and re-enable it. After this, run the REST API and it should create the users in 3.

To add users in Delegated Auth A, simply run the REST API, no changes are needed.

To add users in Default Internal Directory, move it to the top-most position OR disable 1.

Changing directory order is further described in

Last modified on Nov 12, 2018

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.