Migrating users with both new email and new Auth provider

Must-share information (formatted with Markdown):

  • Sonarqube 9.9
  • Sonarqube deployed using Docker/Kubernetes

My company recently joined another company. As a result:

I want to migrate Sonarqube users to use the new Github as Auth provider.

What I’ve tried ?

  • I’m aware of the guide Migrating SonarQube Users Between Identity Providers (with a focus on LDAP → SAML),
  • I used the POST /api/users/update_identity_provider to change the auth provider, but since the email also changed, it won’t let the user log in because of email mismatch
  • We no longer have acces to the old Github (so it’s not possible to update the email in the old github)
  • As an admin, I cannot change a user email because emails are managed by the Auth provider

So my issue is I’m stuck in a cycle:

  • User need to login to update the email,
  • User need to update email in order to log in.

So what are my options here ?

  1. A manual update of emails in the database to unlock the situation; could this work ?
  2. Let the new Auth provider create new users and reassign all issues to new users ?
  3. Anything else ?

Thank you

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:

9.9 → 2025.1.1-> 2025.2 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your question, option 1 is viable but risky. We generally tell people to treat the DB like a black box. Option 2 is the cleanest way to go.

 
HTH,
Ann

Hi,

Thank you for the feedback.
I’ll give the 1st option a try.

Your version is past EOL

Yes, I’m aware. We’re currently in the process of setting up the server again. Upgrading is the next step.

Thank you again.

Hi,

Make sure you take a DB backup before you do.

 
:face_blowing_a_kiss:
Ann