Skip to main content

diagrid sso group create

Map a group to roles

Description​

Map a group to roles. <group> is the value your identity provider sends in the groups claim, exactly as it sends it.

diagrid sso group create <group> [flags]

Examples​


# Map group team-a to the editor role on project team-a-project
diagrid sso group create team-a --role cra.diagrid:editor --project team-a-project

# Map a group to read-only access to every project, with a name to show for it
diagrid sso group create 6f1c2d3e-auditors --display-name Auditors --role cra.diagrid:viewer

# Make a group's members admins of the whole organization
diagrid sso group create platform-admins --role cra.diagrid:admin --confirm-admin-roles

# Map a Keycloak realm role, read from the realm_access.roles claim
diagrid sso group create catalyst-viewers --role cra.diagrid:viewer --groups-attribute realm_access.roles

Options​

--api-key string Diagrid Cloud API key
--confirm-admin-roles Confirm that the group's members become admins of the whole organization, needed when --role grants diagrid:admin, cra.diagrid:admin or org.diagrid:admin
--display-name string A name to show for the group, when its value is an ID
--groups-attribute string The claim in a user's token that lists their groups, as a JMESPath expression such as groups or realm_access.roles; it applies to every group. An empty value means groups. A change reaches each user at their next sign-in
-h, --help help for create
-o, --output string Output format, supported [table, yaml, json] (default "table")
-p, --project string Scope every --role to this project, so cra.diagrid:editor becomes cra.diagrid:editor:projects:<project>
-r, --role strings Role to grant the group's members; repeat it, or separate roles with commas, for more than one (cra.diagrid:admin, cra.diagrid:editor, cra.diagrid:viewer, or one scoped to a project such as cra.diagrid:editor:projects:<project>)

SEE ALSO​

  • diagrid sso group - Map your identity provider's groups to roles in your organization