table of contents
| glab(1) | glab(1) |
NAME¶
glab-service-account-get - Get a service account.
SYNOPSIS¶
glab service-account get [flags]
DESCRIPTION¶
Get a single service account of a project or a group, by its ID or username.
A numeric argument is always treated as an ID. IDs and usernames come from glab service-account list.
Getting a service account by ID requires GitLab 19.4 or later.
OPTIONS¶
-g, --group="" Get a service account of a group instead of a project. Accepts a group ID or full path.
--jq="" Filter JSON output with a jq expression.
-F, --output="text" Format output as: text, json.
-R, --repo="" Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.
OPTIONS INHERITED FROM PARENT COMMANDS¶
-h, --help[=false] Show help for this command.
EXAMPLE¶
# Get service account 42 of the current project glab service-account get 42 # Get a service account by its username glab service-account get service_account_project_123_abc # Get a service account of a specific project glab service-account get 42 --repo user/my-repo # Get a group's service account glab service-account get 42 --group my-group # Print the service account's email address glab service-account get 42 --output json --jq '.email'
SEE ALSO¶
| Nov 2026 | Auto generated by spf13/cobra |