The edge tenant command
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.
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:
This command is available only for device login flow. The environment <env-name> doesn't use device login flowUsage and options
You can use the edge tenant command as follows:
dotnet sitecore edge tenant [subcommand] [options]
Running the tenant command without any subcommands shows you the currently selected tenant for the organization. For example:
dotnet sitecore edge tenantIf you have already selected a tenant, the command displays:
<tenant-name> (id: <tenant-id>), belongs to <organization-id>Otherwise, the command output is a warning and information on how to select a tenant:
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 |
|---|---|
|
|
Specifies the Experience Edge environment to target. Possible values: Default: |
|
|
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:
dotnet sitecore edge tenant listYou can use the following options with the list subcommand:
|
Option |
Description |
|---|---|
|
|
The unique identifier of the target environment. Possible values: Default: |
|
|
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:
dotnet sitecore edge tenant use --id <tenant-id>You can use the following options with the use subcommand:
|
Option |
Description |
|---|---|
|
|
The unique identifier of the tenant you want to select. |
|
|
The unique identifier of the target environment. Possible values: Default: |
|
|
Display developer help and usage information about the command. |