logout

Logs out from the Azure Sphere Security Service. By default, all azsphere commands apply to the current user’s login identity and tenant.

When you use azsphere, the Azure Sphere Security Service verifies your identity by using Microsoft Azure Active Directory (AAD). AAD uses Single Sign-On (SSO, which typically defaults to an existing identity on your PC. If this identity is not valid for use with your Azure Sphere tenant, azsphere commands may fail.

Use logout to sign out of Azure Sphere Security Service. Upon success, you will be signed out and must sign in with azsphere login to continue.

Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere logout
Successfully logged out.