Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automate JIRA user creation

Vignesh Jayagopal
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.
October 20, 2022

Hello,

We are continuously receiving user creation/removal in our JIRA instance as the team is growing.

I am looking for possible options to automate this.

Currently, we are having a separate project in JIRA handling these requests. Team managers will raise the tickets in the project and then it will be picked by JIRA admin to create/remove the users.

Then JIRA admin will close the ticket.

I am looking to automate the JIRA admin work, Once the ticket is raised by managers & moved to a certain status, JIRA should create the users automatically. How this can be achieved?

2 answers

1 accepted

6 votes
Answer accepted
Charlie Misonne
Community Champion
October 20, 2022

You could consider user provisioning via Atlassian Access: https://support.atlassian.com/provisioning-users/docs/understand-user-provisioning/

It will not automate user creation when a ticket is created but it will sync users from your IDP (if you have one) to Atlassian Cloud. Even with user groups if you want to.
You need Atlassian Access for that which is not free.

 

Or if you really need to automate it via tickets:

You can create an automation rule that fires whenever your tickets go to that status. With a send web request action you can call the Jira REST API to create users. See create user. Note: this API endpoint is flagged as experimental and might change later.

Vignesh Jayagopal
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.
November 1, 2022

@Charlie Misonne Thanks for the suggestion, i will consider doing it via the second option.

is there a way to add the users to specific groups while creating? I don't find suitable parameters for sending the group details in request

Charlie Misonne
Community Champion
November 8, 2022

There is another endpoint to add a user to a group: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post

Note: you need the Atlassian ID of the user in order to add it to a group. So when you create the user you might want to save the ID somewhere.

0 votes
Rinaldi James Michael
Contributor
December 23, 2022

I'd wanted to do the same as well. I'd created a script for Adaptavist's Scriptrunner and shared it around a month ago. Do feel free to test it out.
https://community.atlassian.com/t5/Jira-discussions/Add-Create-users-in-Jira-and-Confluence-using-Scriptrunner/td-p/2201796

 

If your organization allows it. You can create custom fields for the project/board. Modify the script to receive input (like email address, name, project...etc using text fields, project pickers, group picker custom field types) from the Jira issue and use the Scriptrunner module in Jira's built-in automation plugin. 
I tried this earlier and it worked. But the logic was a little messy when I tried it. You would have to put in some considerable amount of effort to get it working smoothly.

 

Lastly, you could try using a mail handler to auto-create a user account. Not sure how safe that method is but it's worth trying out.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events