At a certain point in an Organization, there will come a time when there's a change of Infrastructure or process or even the Organization as a whole. This can result in different change management processes and administration of users can get tedious, especially when your organization is transitioning from one domain to another. Managing these users or changing their email addresses can be cumbersome when you have hundreds or even thousands of users. Instead of performing each change, one by one, you can be able to use a bulk method.
Here is where this workaround comes in. which involves using a Bash Script; however it involves the use of Atlassian's User REST API, a CSV file, a BASH environment and the ability to follow the 2 simple steps below.
Download the Script from Github here
→ The Idea here is that the <new email Address> must not exist as an Atlassian Account
→ If changing different Domains, both domains or those domains must have been claimed.
→ Generate API Key from https://admin.atlassian.com/o/{organizationId}/admin-api where {organizationId} is referring to the alphanumeric string of your Organization.
Note: Subscription to Atlassian Access might be required.
Navigate to your Instance Admin Hub admin.atlassian.com
Click on Export Users, on the upper right corner of the screen. this will give you a list of users on the Instance
P/S: Depending on how many Applications you own, you might have Additional Columns, however we want only 6 columns at any given time or if you know what you're doing, modify the script to suite the number of columns.
→ Also, remove the headers of the CSV file as that won’t be needed.
Make sure that you have user permission right on the file.
On your Terminal, run
$:chmod u+x <filename>.sh
Then to initiate the script run
$:./<filename>.sh
Follow the prompt to perform the action. For Windows Users, you might need to download CMder which will provide you a BASH environment to initialize this script. (For - macOS and Linux users, Bash should work just fine.)