How to transfer token to another user

  • which versions are you using: Sonarqube Developer Edition 2025.1
  • how is SonarQube deployed: zip
  • what are you trying to achieve : A sonarqube admin created all the tokens under his own account instead of the Admin account. I would like to be able to transfer there token to the admin account. As they are linked to CI/CD pipelines (around sixty of them), I would prefer to avoid having to recreate them.

I haven’t found any UI options. However, in the DB, there is the user_tokens table. If I change the user_uuid, will the tokens still be valid?

Thanks for your help
Antoine

This is an issue we ran into as well. Creating Project analysis tokens still ties them to the user and depends on their status. If you disable the user - the token goes down as well.
As such we have to use the default Admin account to create tokens.
I have not tried the method for directly manipulating the DB entries, though it would be worth a try i guess.

Hi,

Welcome to the community!

You will not be able to transfer ownership of the existing tokens, and you should not edit the DB directly.

As @georgi.yankov recommends, you should use a technical account to re-issue tokens and gradually replace them in your pipelines.

 
HTH,
Ann

Hi ganncamp and georgi.yankov, thanks for your feedback.

Ok, so I will revoke my tokens, recreate them on my local admin account and update all pipelines with new values

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.