Bulk change/merge email addresses

John Cherian December 11, 2020

Hi,

 

 

Our organization has changed from amtrust mobile to Bolttech. We have some users on Atlassian still using the old amtrust email. On the single user’s page, I cannot see an option to change the email address. How can we do this?

 

Also, how to bulk edit for all existing amtrust users?

 

 

If we send invite to the user’s bolttech email and then delete the old amtrust email, will it affect the user account, issues, groups, projects etc?

 

As per the forums, there is no way to merge the two emails? Or has there been any update or new improvement?

 

1 answer

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 11, 2020

Hi John,

We are about to do the same thing. Here's email that Atlassian Support sent us. I have updated with your relevant names. 

I believe the best solution for you to achieve your goal of changing every user email address from @amtrust to @Bolttech is to export the claimed accounts for the amtrust domain, verify the domain Bolttech and use a script to bulk change every user email address.
I break down each step for this procedure below:

  1. Export a list of your managed accounts (click on Export accounts:
    Settings > User Management > Users
    Now with the exported CSV file, create a new column to hold the value for the new email address and fill their respective values for each user.
  2. Verify the domain Bolttech and claim its accounts;
  3. Build a script to read the csv file and for each row, make a request to the API
    1. Generate an admin API key as a way to authenticate your actions using the API. Create an admin API key
    2. Write a script of your desired language to read each line of the CSV file we have prepared in the above steps and call the user management API.
      Example below:

3.  curl --request PUT \
4.    --url 'https://api.atlassian.com/users/{account_id}/manage/email' \
5.    --header 'Authorization: Bearer <access_token>' \
6.    --header 'Content-Type: application/json' \
7.    --data '{
8.    "email": $newEmail
}'

As documented here: https://developer.atlassian.com/cloud/admin/user-management/rest/api-group-users/#api-users-account-id-manage-email-put

I would be interested in how that works out for you. We will probably attempt it in the coming week as well. 

SunilKumar.Shangishetty April 20, 2021

Hi John,

Hope you're doing good.
I'm new to JIRA, I have the same requirement.
You have provided a very detailed solution above, I have a question, where do we need to write that script(Curl). Can you please help me with a sample code to update the email address.


Thanks in advance.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2021

We have tucked the code into a Ruby app because the app servers other purposes for us as well. But you should be able to use Ruby or Python or others. 

Outside of that, I am not a developer and our code is unique to our app. You might get better guidance with a support ticket from Atlassian.  :-)

https://support.atlassian.com/contact/#/

SunilKumar.Shangishetty April 20, 2021

Thanks for the quick response John.

Like John Funk likes this
Sten Kivi May 2, 2023

Hi @John Funk 

Do you remember if this required for Organization to have "Atlassian Access" ?

Suggest an answer

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

Atlassian Community Events