Can I use curl to add users and their settings into Stash uses LDAP

I want to be able to add users with their login ID, name, and email within Stash but with their user ID (login ID) I want Stash to be able to pick them up.  I found a curl script that show example but I don't want to use any password since using LDAP.  Do I need to indicate LDAP authentication in the script?  What do I need to modify in the script for this to work?

curl -H "Content-Type:application/json" -H "Accept:application/json" --user admin:admin -X POST 'http://localhost:7990/rest/api/1.0/admin/users?name=testuser4&password=testuser4&displayName=Test%20User%204&'

2 answers

If you're using LDAP (and have configured your LDAP server as a User Directory following something like, then you most likely don't need to hit the users endpoint to create a user - the user is already available. You probably just need to grant them the LICENSED_USER permission -

William, make sure that you have this "LDAP" directory in the first priority in creating users. You can find it in the path below. 


Admin Screen > Accounts > USer Directories

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,764 views 1 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you