Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

William Causey June 11, 2015

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&emailAddress=test@user4.com&addToDefaultGroup=false'

2 answers

0 votes
GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 15, 2015

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

/plugins/servlet/embedded-crowd/directories/list

Admin Screen > Accounts > USer Directories

0 votes
Adam
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2015

If you're using LDAP (and have configured your LDAP server as a User Directory following something like https://confluence.atlassian.com/display/STASH/Connecting+Stash+to+an+existing+LDAP+directory), 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 - https://developer.atlassian.com/static/rest/stash/3.10.0/stash-rest.html#idp1918800

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events