tenant

Manages an Azure Sphere tenant.

Operation Description
create Creates a new tenant
download-ca-certificate Downloads the CA certificate for the current tenant
download-validation-certificate Downloads the validation certificate for the current tenant, based on the provided verification code
list Lists the available Azure Sphere tenants
select Selects the default Azure Sphere tenant to use on this PC
show-selected Shows the default Azure Sphere tenant for this PC

create

Creates a new Azure Sphere tenant.

By default, azsphere allows one tenant per Azure Active Directory (AAD). If you already have a tenant and are certain you want another one, use the --force parameter. Currently, you cannot delete an Azure Sphere tenant.

Required parameters

Parameter Description
-n, --name string Specifies a name for the tenant.

Optional parameters

Parameter Description
--force Forces creation of a new Azure Sphere tenant in the current user's Azure Active Directory (AAD).
Global parameters

Parameter Description
-v, --verbose Provides verbose output
-?, --help Displays help on the command

Example

azsphere tenant create --name "DocExample"
warn: The following Azure Sphere tenants already exist in this AAD. To add a new Azure Sphere tenant, call this
command with the '--force' flag.
 --> 'Microsoft' (d343c263-4aa3-4558-adbb-d3fc34631800)
error: Command failed in 00:00:01.7883424.

download-ca-certificate

Downloads the certificate authority (CA) certificate for the current Azure Sphere tenant.

The CA certificate is required as part of the device authentication and attestation process.

Required parameters

Parameter Description
-o, --output filepath Specifies the path and filename in which to store the CA certificate. The filepath can be an absolute or relative path but must have the .cer extension.
Global parameters

Parameter Description
-v, --verbose Provides verbose output
-?, --help Displays help on the command

Example

azsphere tenant download-ca-certificate --output CA-cert.cer
Saving the CA certificate to 'C:\Users\Test\Documents\AzureSphere\CA-cert.cer'.
Saved the CA certificate to 'CA-cert.cer'.
Command completed successfully in 00:00:03.0547491.

download-validation-certificate

Downloads the validation certificate based on the provided verification code for the current Azure Sphere tenant.

The validation certificate is part of the device authentication and attestation process.

Required parameters

Parameter Description
-c, --verificationcode string Provides the verification code required to get a validation certificate.
-o, --output filepath Specifies the path and filename in which to store the validation certificate. The filepath can be an absolute or relative path but must have the .cer extension.
Global parameters

Parameter Description
-v, --verbose Provides verbose output
-?, --help Displays help on the command

Example

azsphere tenant download-validation-certificate --output validation.cer --verificationcode 123412341234
Saving the validation certificate to 'C:\Users\Test\Documents\AzureSphere\validation.cer'.
Saved the validation certificate to 'validation.cer'.
Command completed successfully in 00:00:01.7821834.

list

Lists the Azure Sphere tenants in the current AAD.

Global parameters

Parameter Description
-v, --verbose Provides verbose output
-?, --help Displays help on the command

Example

azsphere tenant list
ID                                   Name
--                                   ----
d343c263-4aa3-4558-adbb-d3fc34631800 Microsoft

Command completed successfully in 00:00:02.0344647.

select

Selects the default Azure Sphere tenant to use on this PC. To display the current default tenant, use azsphere tenant show-selected.

Required parameters

Parameter Description
-i, --tenantid GUID Specifies the ID of the Azure Sphere tenant to use.
Global parameters

Parameter Description
-v, --verbose Provides verbose output
-?, --help Displays help on the command

Example

azsphere tenant select --tenantid d343c263-4aa3-4558-adbb-d3fc34631800
Default Azure Sphere tenant ID has been set to 'd343c263-4aa3-4558-adbb-d3fc34631800'.
Command completed successfully in 00:00:00.3808250. 

show-selected

Displays the ID of the default Azure Sphere tenant for the PC. This is the tenant selected with the azsphere tenant select command.

Global parameters

Parameter Description
-v, --verbose Provides verbose output
-?, --help Displays help on the command

Example

azsphere tenant show-selected
Default Azure Sphere tenant ID is 'd343c263-4aa3-4558-adbb-d3fc34631800'.
Command completed successfully in 00:00:00.3425522.