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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,467,605
Community Members
 
Community Events
177
Community Groups

New users' group problem when created via API v3

Edited

Hi all!

 

I'm tying to create a new user with api v3 (/rest/api/3/user) without any group.

When a make a POST request, a new user is created normally, but he is created with jira-software-users group

 

My Default Access Groups config is correct:

 

cinfigjira.jpg

 

And when I create a new user via UI, this does not happen.

 

That's my code:

def create_jira_user(email, fullname):
url = "https://mycompany.atlassian.net/rest/api/3/user"
payload = json.dumps({
"emailAddress": email,
"displayName": fullname
})
response = requests.request(
"POST",
url,
data=payload,
headers=headers,
auth=get_jira_authorization()
)
print(json.loads(response.text))

 

Searching on API (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-post). I can send some Additional Properties, but didn't find any sample to help me.

Am I doing something wrong? Is there a way to send some Additional Properties that new user is created without or a specific group (that does not have some product access).

 

Thanks!

1 answer

1 accepted

0 votes
Answer accepted

Hi @Felipe Kogati 

Welcome to Community! with your code, this shouldn't add the user into any group, given that you've disabled the default access group for "jira-software-users" under Product access. Do you have Atlassian access subscription on your organization? it could explain why the default group keeps getting added.

Hi @Prince Nyeche 

 

Thanks for your fast response :]

No, we don't have Atlassian Access subscription :/

Do you know the diference between create an user via API or via UI? Or and an example how can I send Additional Properties via API?

Additional properties is referring to this endpoint if any has been created on your Instance. I have a Free Addon I created, it basically uses REST API simple structures, you can also view the codes on Github to see how I implemented it. you can give it a go and see if it works as expected for you. As far as I know that should just work except something wrong is going on which isn't shown on your codes here.

 

Hi @Prince Nyeche  !

 

Thank you very much for your support!

I've tried everything, without success :/

 

I solved this issue checking and removing all default groups that were assigned to the new created user, via API.

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events