The CLI login command
The Sitecore CLI includes a login command that allows developers to log into a Sitecore instance.
Sitecore CLI login command requires the use of Sitecore Identity.
Usage
Usage
The Sitecore CLI login command is initiated within the Sitecore CLI by using the following:
Options
Options
You can use the following options with the login command:
|
Option |
Required? |
Description |
|---|---|---|
|
|
No |
Identity authority for the environment, such as identity server or AAD tenant URL. |
|
|
No |
Named Sitecore environment to use. Default: |
|
|
No |
Sitecore content management hostname to connect to. |
|
|
No |
Enable writing data to the environment. |
|
|
No |
Use client credentials (for CI/CD, shared secret). |
|
|
No |
The OAuth ClientID to send. Defaults to |
|
|
No |
The OAuth client secret to send. Only used for client credentials authentication. |
|
|
No |
Path to the root |
|
|
No |
Display developer help and usage information about the command. |
|
|
No |
Outputs additional diagnostics and detailed information about the command. |
Examples
Examples
The following are examples of using the login command for interactive user login:
|
Command |
Result |
|---|---|
|
|
Output: |
The following are examples of using the login command for non-interactive user login:
|
Command |
Description |
|---|---|
|
|
Use the non-interactive client login. |
For more information, refer to logging in to a Sitecore instance using the CLI.