How to change all Crowd internal users e-mail domain name in bulk
This guide is tested in Crowd 2.8
This guide is for informational purposes and is not eligible for support from Atlassian. If you have any questions about the information on this page, please reach out to our community at Atlassian Answers for help.
When a company get acquired, it is necessary for them to change their e-mail address domain name to the new company. However, Crowd does not have a bulk editing feature that could help simplify this process.
- Create a complete database backup for safety precaution.
Execute this SQL query to obtain internal directory id.
SELECT id FROM cwd_directory WHERE impl_class = 'com.atlassian.crowd.directory.InternalDirectory';
Execute the following SQL queries to modified the e-mail domain of your internal users.
UPDATE cwd_user SET email_address = replace(email_address,'<PreviousDomain>','<NewDomain>') WHERE directory_id = <ID from step 2>; UPDATE cwd_user SET lower_email_address = replace(lower_email_address,'<PreviousDomain>','<NewDomain>') WHERE directory_id = <ID from step 2>;
- Restart Crowd
This method does not work for external users such as LDAP server or another Crowd as Crowd will retrieve the data from the external server configured. Hence any modification in Crowd database will be temporary.