Zum Hauptinhalt springen

GetClientRoles

Lists the roles assigned directly to a client in the tenant (without roles inherited from groups).

Examples​

List the roles assigned directly to the client 'ci-deploy':

octo-cli -c GetClientRoles -id "ci-deploy"

Options​

ShortLongRequiredDescription
-id--clientIdyesThe ClientId whose direct roles you want to list

Notes​

Prints a JSON array of the client's direct roles (Id and Name, sorted by name; [] when it has none). Roles the client gets through a group are not listed. No secret is printed. Standard output carries only the JSON (logs go to standard error), so it can be piped to jq.

Reads the tenant of the context (switch it per call with --context). An unknown client or tenant ends with a message naming it and exit code -5; a context whose tenant does not exist usually stops earlier, at sign-in (the token for that tenant is refused, exit code -4).

A role id that is no role of the tenant is printed with Name null and a warning.

Needs a role that may read the identity directory in the tenant (e.g. TenantManagement or UserManagement).