--- title: '`glab service-account update`' stage: AI Clients group: Developer Clients info: To determine the technical writer assigned to the Stage/Group associated with this page, see --- Update a service account. ## Synopsis Update the name, username, or email address of a service account of a project or a group, by its ID or username. - Only the given fields change. At least one of `--name`, `--username`, or `--email` is required. - A field cannot be cleared, so an empty value is rejected. - A numeric argument is always treated as an ID. IDs and usernames come from `glab service-account list`. - A new custom email address must be confirmed before the account uses it, unless the top-level group has a matching verified domain or email confirmation is turned off on the instance. Until then, the address is shown as the unconfirmed email. - The username of a service account associated with a composite identity cannot be changed. Updating a group service account requires GitLab 17.10 or later. Changing the email address requires GitLab 18.2 or later. ```plaintext glab service-account update [flags] ``` ## Examples ```console # Rename service account 42 of the current project glab service-account update 42 --name "Release bot" # Change the username of a service account, found by its current username glab service-account update release-bot --username release-bot-2 # Change the email address of a service account of a specific project glab service-account update 42 --email release-bot@example.com --repo user/my-repo # Rename a group's service account glab service-account update 42 --name "Release bot" --group my-group ``` ## Options ```plaintext --email string New email address of the service account. -g, --group group Update a service account of a group instead of a project. Accepts a group ID or full path. --jq string Filter JSON output with a jq expression. --name string New name of the service account. -F, --output string Format output as: text, json. (default "text") -R, --repo string Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted. --username username New username of the service account. ``` ## Options inherited from parent commands ```plaintext -h, --help Show help for this command. ```