Skip to main content

CreateExternalTenantUserMapping

Creates an external tenant user mapping: grants a user of another tenant (registry ancestor or a sibling tenant that permits this one) access to the tenant of the context, with roles and/or groups.

Examples​

Basic usage:

octo-cli -c CreateExternalTenantUserMapping `
-stid "octosystem" `
-suid "<user-id-from-parent>" `
-sun "alice" `
-rids "Development,DashboardViewer"

Grant a sibling-tenant user (found with LookupSourceTenantUser) with two groups:

octo-cli -c CreateExternalTenantUserMapping `
-stid "meshmakers" `
-suid "686a6215fd3e5972ff5693fd" `
-sun "alice" `
-g "Operators,Viewers"

Options​

ShortLongRequiredDescription
-stid--sourceTenantIdyesSource tenant ID
-suid--sourceUserIdyesSource user ID (userId of LookupSourceTenantUser)
-sun--sourceUserNameyesSource user name (userName of LookupSourceTenantUser; the service stores the name of the source user record)
-rids--roleIdsnoComma-separated list of role IDs to assign
-g--groupsnoComma-separated list of groups of the tenant of the context (group IDs or group names) the user becomes a member of

Notes​

Prints the mapping as stored: the user name of the source user record, the source tenant and the group names.

A source tenant that is neither a registry ancestor nor permits the tenant of the context, or a user it does not have, is refused with HTTP 403, code SourceTenantNotPermitted (one answer for all of these).

A group ID that is no group of this tenant is refused with HTTP 400, code UnknownGroup (nothing is stored); a second mapping for the same user with HTTP 409, code ExternalTenantUserMappingAlreadyExists.

Groups need an identity service with older services ignore them.