How to change Bamboo internal directory username

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This article talks about how to change the username for a Bamboo Internal directory user. This page will not cover changing the username of users from other external directories like ldap, crowd, active directory etc. 
There is currently a feature request raised to provide this functionality to Bamboo admin users, kindly refer BAM-25441 - Allow option in Bamboo GUI to rename username for Bamboo Internal directory users

Environment

All supported versions of Bamboo

Solution

We can use the below Bamboo REST API to achieve this functionality.

Rest API to change username
curl --user admin_user:admin_password \
  --request PUT \
  --url 'http://bamboo921:8085/rest/api/latest/admin/users/rename' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "new_user_name",
  "oldName": "old_user_name"
}'

 Please replace admin_user, admin_password with correct values of a user which has admin right on your Bamboo instance.
Please replace http://bamboo921:8085 with the URL of your Bamboo instance.
 Please replace new_user_name and old_user_name with appropriate username values.

Once you run the above REST API, the username will get changed, in <bamboo-home>atlassian-bamboo.log file you can see the below information which means the rename was successful.

2023-11-07 15:28:01,754 INFO [http-nio-8085-exec-9] [UserRenameHelper] Performing user rename in ACL_ENTRY
2023-11-07 15:28:01,762 INFO [http-nio-8085-exec-9] [UserRenameHelper] Performing user rename in ACL_OBJECT_IDENTITY
2023-11-07 15:28:01,764 INFO [http-nio-8085-exec-9] [UserRenameHelper] Performing user rename in OS_PROPERTYENTRY
2023-11-07 15:28:01,770 INFO [http-nio-8085-exec-9] [UserRenameHelper] Performing user rename in REMEMBERME_TOKEN
2023-11-07 15:28:01,776 INFO [http-nio-8085-exec-9] [UserRenameHelper] Performing user rename in AUTH_ATTEMPT_INFO
2023-11-07 15:28:01,777 INFO [http-nio-8085-exec-9] [UserRenameHelper] Performing user rename in AUTHOR
2023-11-07 15:28:01,779 INFO [http-nio-8085-exec-9] [UserRenameHelper] Performing user rename in PASSWORD_RESET_TOKEN
2023-11-07 15:28:01,783 INFO [http-nio-8085-exec-9] [UserRenameHelper] Performing user rename in BUILDRESULTSUMMARY_LABEL
2023-11-07 15:28:01,792 INFO [http-nio-8085-exec-9] [UserRenameHelper] Performing user rename in ACCESS_TOKEN
2023-11-07 15:28:01,799 INFO [http-nio-8085-exec-9] [UserRenameServiceImpl] Not performing user rename in USER_COMMENT, AUDIT_LOG, BUILDRESULTSUMMARY_CUSTOMDATA and DEPLOYMENT_RESULT_CUSTOMDATA





Last modified on Jan 27, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.