The edge tenant command

Current version: 10.2

The Experience Edge plugin for Sitecore CLI provides the edge tenant command to help you identify the currently selected Edge tenant, list all available tenants for the organization, and switch the tenant.

Note

The edge tenant command and subcommands are only available with device/interactive login flow. Running these commands in a direct/client credentials flow results in the following error:

RequestResponseshell
This command is available only for device login flow. The environment <env-name> doesn't use device login flow

Usage and options

You can use the edge tenant command as follows:

RequestResponseshell
dotnet sitecore edge tenant [subcommand] [options] 

Running the tenant command without any subcommands shows you the currently selected tenant for the organization. For example:

RequestResponseshell
dotnet sitecore edge tenant

If you have already selected a tenant, the command displays:

RequestResponseshell
<tenant-name> (id: <tenant-id>), belongs to <organization-id>

Otherwise, the command output is a warning and information on how to select a tenant:

RequestResponseshell
The tenant to use is not chosen. Run 'dotnet sitecore edge tenant use --tenantId <tenantId>' command first.

You can use the following options with the tenant command:

Option

Description

--env, --environment

Specifies the Experience Edge environment to target.

Possible values: preprod, prod

Default: prod

-?, -h, --help

Displays developer help and usage information about the command.

Subcommands

You can use the following tenant subcommands:

  • list - shows all the tenants the current user can access.

  • use - selects a tenant.

The list subcommand

The edge tenant list displays all the tenants the current user can access. For example:

RequestResponseshell
dotnet sitecore edge tenant list

You can use the following options with the list subcommand:

Option

Description

--env, --environment

The unique identifier of the target environment.

Possible values: preprod, prod

Default: prod

-?, -h, --help

Display developer help and usage information about the command.

The use subcommand

The edge tenant use subcommand sets the selected tenant based on the provided tenant ID. For example:

RequestResponseshell
dotnet sitecore edge tenant use --id <tenant-id>

You can use the following options with the use subcommand:

Option

Description

--id, --tenant-id

The unique identifier of the tenant you want to select.

--env, --environment

The unique identifier of the target environment.

Possible values: preprod, prod

Default: prod

-?, -h, --help

Display developer help and usage information about the command.

Do you have some feedback for us?

If you have suggestions for improving this article,