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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,247,098
Community Members
 
Community Events
164
Community Groups

Add user to group - Crowd Rest API

Edited

Hi,

I want to add a user as a direct member to a group via rest API.

I'm using crowd admin for authorization (basic mode). But the result is: Application failed to authenticate! "401".

I can log in to crowd using crowd admin username and password. I don't know how to fix this status.

Any suggestion?

 

curl --location --request POST 'https://localhost/crowd/rest/usermanagement/1/group/user/direct?groupname=samplegroup' \--header 'Authorization: Basic username&password' \--header 'Content-Type: application/json'\ --data-raw '{"name""sampleuser"}'

 

3 answers

I wrote a wrapper in Rust as well as leveraged ScriptRunner and HttpURLConnection to do REST API calls with our Crowd instance. In the base formatting for my json and URL looked similar to below:

URL:

http://crowdBaseUrl/crowd/rest/usermanagement/latest/user/group/direct?username="user unique ID"

JSON:

"{"name": "NAME OF GROUP", "description": "LEFT BLANK", "type": "GROUP", "active": "true"}"

The username password you're using is the application username password correct? These are defined as applications in crowd, not as users in crowd.

I have the same problem, any solution found?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

Presenter Mode for Confluence is here 🖥 👩‍💻

👋  Hello Community!  My name is Stephanie Zhang, and I’m a product manager on the Confluence cloud team. Today, I’m excited to announce the rollout of  Presenter Mode : a ...

1,127 views 11 29
Read article

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