Email address change for all users in Confluence

Bryan Thomas January 4, 2018

I want to change all confluence users email address from our old company name to new company name?

 

Is there a way we can replace each users email with the new email address and have that account maintain their documents and content?

2 answers

0 votes
Lars Olav Velle
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.
January 4, 2018

@Bryan Thomas have you checked that the users email address is does not update when the user logs into the application?

 

With our Single Sign-on add-on attributes are updated automatically when the user logs in.

Example:

The user mark.miller has an email address mark.miller@example.com in JIRA and in Okta. 

His email address is then changed to mark.miller@newdomain.com in Okta.

The next time he logs into JIRA his email address is automatically changed to mark.miller@newdomain.com

A requirement for this is (obviously) that the email address is sent as a attribute statement (Name: email, Value user.email) 

 

Cheers,

Lars, Kantega Single Sign-on

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 4, 2018

It depends on what type of user directory you are using and your username format.

Is it the internal Confluence directory?  Is the user name format a simple "login" and not their email (e.g. when logging in, I'd enter "nic" in the username box, not "nic@mydomain.com")

Bryan Thomas January 4, 2018

We currently use Confluence Internal Directory and are using login ids (bthomas) to login via OKTA 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 4, 2018

Ok, that keeps it more simple.   I assume your Okta is the usual usage - it's effectively a password safe, rather than an authenticator?

Bryan Thomas January 4, 2018

Correct they gain access by login in to OKTA and click on icon to gain access.  

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 4, 2018

Ok, good.  There's several ways to do this, but it's better to look at what needs doing before talking methods.

The change you need to make is relatively simple. There is a table in the database called cwd_user.  This holds (amongst other stuff), the login id, the data that connects a user to a thing in Jira, and an email address.  As you only want to change the email address, there's no problem with losing connections to other things - the email has nothing to do with how users are linked to pages/spaces/permissions/etc

I would personally do it the safer way - whack in script runner and write a little bit of one-off code to go through the user directory and replace addresses as appropriate.

But SQL is probably quicker and cheaper.   If, for example, you have an email format of a.name@youroldplace.com and the update is as simple as changing it to a.name@yournewplace.com, then a simple search and replace through the two email columns will do it.  Make sure Confluence is offline before doing this otherwise it might cache some of the old emails.

Bryan Thomas January 4, 2018

Great info and thanks for your help. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events