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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

157 views 2 14
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