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,293,246
Community Members
 
Community Events
165
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
Community showcase
Posted in Jira Service Management

Jira Service Management Documentation Opportunities

Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...

147 views 0 3
Join discussion

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