Forums

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

Best practice to add/import users

Gabe Cz
Contributor
September 26, 2024

Hi

We have over 7000 users, or at least user accounts I'd say 10% invalid email addresses/typos/etc but we need those anyways. I can convert it to any format. List of emails, txt with 1 email in a line, or json/csv/xml whatever is desired.

We will have one closed project for our closed tickets (about 150.000 tickets) import is ready to rock all I need is the users to be uploaded so I can download the csv and replace their email addresses in the upload json to their jira userIDs. Then we will have a production helpdesk project.

There also will be another solution for internal use. That will be not a "Service Management" project like the two I mentioned above. So I'm sure i can restrict the access of end users (customers) so they only can access the production project and nothing else. (right?)

My question is if we should imoprt/upload them to admin.atlassian / directory/users, and add them Customer only access? Or should i add them to the project / project settings / people?

Can someone show me an example JSON for both? I'm struggling creating users the 1st (let's call it product level customers) way, and have no idea how to do the 2nd (let's call it project level customers)

I noticed that if I add a user to the projects /people page, it'll pop up in the "product level" list and will get an email invite. That is absolutely out of the question, we cannot send out 7200 emails and expect 0 callbacks/emails/questions/panic.

What I need is a solution for mass import users that only (and I mean ONLY) have customer access. In our case the group is called "jira-servicemanagement-customers-COMPANYNAME" But when I add a user with the follwing json, they'll be put in a 2nd group called "jira-software-users-COMPANYNAME" for whatever reason. It'll be fine with me to remove them from this group manually after a 7200 user JSON import. 1 click per user and it's done. BUT when I remove a user from a group, the undesired email invite goes out. Same happens when I create users manually 50 a time. that means I'd had to do the same thing 146 times and expecting no mistakes. (no go in my opinion) and give them 0 rights when creating and unchecking the send out email invite, it's all good, but once again when I add them to the "jira-servicemanagement-customers-COMPANYNAME" group, the email invitaton will be sent. I'm kind of between a rock and a hard place here.

Even if I'd bite the bullet and would add users by hand they'd get an email invitation which I under no circumstances want.

Any suggestions that I can try? Preferred would be JSON but if I could get a proper guide to use API that'd be ok too. Once again: 7200 users, only in group "jira-servicemanagement-customers-COMPANYNAME" and nowhere else, and no email invitation.

 

import-users.json

{
"users": [{
"name": "SomeUniqueName",
"groups": ["jira-servicemanagement-customers-COMPANYNAME"],
"active": true,
"email": "some-email@gmail.com",
"fullname": "Full Name"
} ] }

2 answers

0 votes
Gabe Cz
Contributor
September 27, 2024

Just an update on REST API2

when i run this, user gets created but is in the User (agent) group. One step closer this way.. still not perfect

curl --request POST \
--url 'https://uit-ucla.atlassian.net/rest/api/2/user' \
--user 'gabe@my.email:MYAPIKEY' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"displayName": "ASas4fasf6",
"emailAddress": "s4mpl4emal6@mail.c0m",
"products": ["jira-servicedesk"]
}'

I'll try to combine this with the group api to modify group membership. However, despite user gets created, from where i run the curl, i get this error "{"errorMessages":["The request failed. We're not sure what went wrong. Try again and if the problem persists, contact Jira support."],"errors":{}}" and i'm puzzled why...

0 votes
Ingo Volkhausen
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.
September 27, 2024

Hi @Gabe Cz 

I see many questions and I do have one idea regarding the following issue:

" ... "jira-servicemanagement-customers-COMPANYNAME" But when I add a user with the follwing json, they'll be put in a 2nd group called "jira-software-users-COMPANYNAME"

Those are 2 different products (JSM and JS) and therefor it might be you have to review "Approved Domains" Configuration via the steps below and put them to None.

Maybe this is the first puzzle piece to proceed.



image.png

Gabe Cz
Contributor
September 27, 2024

Hi and thanks,

i think i set up the product roles as you suggested.

i post the json, and the result of the import.

Basically the same result.

I'm thinking of removing every group but "jira-admins" that has admin access to every product. (probably not even possible to remove it anyways, and re-create all gropus from scratch, separate group for every product and right, no combo groups with multiple products and/or rights. Somehow I feel like that should fix this misery.

Thanks for all suggestions and help.

 

ps must add we're on trial. is that restricting things? surely i cannot make the "kaban" project private because we're on trial for example

result1.jpgrights1.jpguserjson.jpgusers1.jpg

Suggest an answer

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

Atlassian Community Events