The cloud login command
The Sitecore XM Cloud plugin provides the cloud login command. The command authenticates a person through the Sitecore CLI with a SitecoreAI Organization, granting them access tokens and claims based on authorization.
Initial credentials and endpoints are stored in the Sitecore.DevEx.Extensibility.XMCloud<version>\plugin\plugin.json file. After logging in, you can find them in the .sitecore\user.json file.
Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.
Usage
You can use the cloud login command as follows:
dotnet sitecore cloud login [options] You can run the command without any options.
To log in to a SitecoreAI Organization, the Sitecore CLI XM Cloud plugin allows two flows of authentication and authorization:
-
An interactive user login using a device code flow.
-
A non-interactive client login using a client credentials flow. This is used by clients such as Continuous Integration (CI) servers.
For interactive user login using a device code authentication flow, use the command:
dotnet sitecore cloud loginFor non-interactive client logins using client credential flows, use the command:
dotnet sitecore cloud login --client-credentials --client-id <clientId> --client-secret <clientSecret>Options
The cloud login command has the following options:
|
Option |
Description |
|---|---|
|
|
Specifies the Identity Server used to authenticate to the Sitecore Cloud system and Organization. Default: the value set with the SaaS Identity auth URL. |
|
|
Specifies the audience for authentication to the Sitecore Cloud system and Organization. In production, provide one of the following audiences:
XM Cloud is now SitecoreAI Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated. |
|
|
Specifies the client ID used for the Sitecore Cloud system and Organization authentication. |
|
|
Specifies the client secret used for authentication to the Sitecore Cloud system and Organization. |
|
|
A Boolean parameter specifying whether to use the client credentials flow. Use it for authentication flows with continuous integration and automation tools. |
|
|
Specifies the SitecoreAI hosting URL. XM Cloud is now SitecoreAI Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated. |
|
|
Path to the folder containing the Default: the root directory of the Sitecore project solution. |
|
|
Write additional information about the command. |
|
|
Write diagnostics and detailed information about the command. |
|
|
Display developer help and usage information about the command. |