Skip to content

Instantly share code, notes, and snippets.

@agehlot
Created March 2, 2026 03:52
Show Gist options
  • Select an option

  • Save agehlot/8e5223d3b4f616afda8e343a589ec5ba to your computer and use it in GitHub Desktop.

Select an option

Save agehlot/8e5223d3b4f616afda8e343a589ec5ba to your computer and use it in GitHub Desktop.
These are few sample sitecore cli commands that can be used to automate authentication in non interactive way.
sitecore cloud login --client-id DzXk09Nx1BEivaqHaE0oMhmaz4rcugzN --client-secret 7idU1Ph9DPLj4IQIrrVjN6gn-ETYhDFyDawyltBMYXYMQZqJOMz4vJDI2PM_I0fH --allow-write
dotnet sitecore cloud login --authority https://auth.sitecorecloud.io --cm http://{XM_CLOUD_INSTANCE} --audience https://auth.sitecorecloud.io --allow-write true --client-credentials true --client-id DzXk09Nx1BEivaqHaE0oMhmaz4rcugzN --client-secret 7idU1Ph9DPLj4IQIrrVjN6gn-ETYhDFyDawyltBMYXYMQZqJOMz4vJDI2PM_I0fH
-----------------------------------
https://doc.sitecore.com/sai/en/developers/sitecoreai/log-in-to-an-instance-with-the-sitecore-cli.html#use-a-non-interactive-client-login-client-credentials-flow
-----------------------------------
dotnet sitecore cloud login --authority https://auth.sitecorecloud.io --cm https://xmc-horizontald97c8-marketplace969f-dev4587.sitecorecloud.io/ --audience https://auth.sitecorecloud.io --allow-write true --client-credentials true --client-id DzXk09Nx1BEivaqHaE0oMhmaz4rcugzN --client-secret 7idU1Ph9DPLj4IQIrrVjN6gn-ETYhDFyDawyltBMYXYMQZqJOMz4vJDI2PM_I0fH
sitecore login --authority https://auth.sitecorecloud.io --cm https://xmc-horizontald97c8-marketplace969f-dev4587.sitecorecloud.io/ --audience https://auth.sitecorecloud.io --allow-write true --client-credentials true --client-id DzXk09Nx1BEivaqHaE0oMhmaz4rcugzN --client-secret 7idU1Ph9DPLj4IQIrrVjN6gn-ETYhDFyDawyltBMYXYMQZqJOMz4vJDI2PM_I0fH
-------------------------------------------
sitecore login --authority https://auth.sitecorecloud.io --cm https://xmc-horizontald97c8-marketplace969f-dev4587.sitecorecloud.io/ --audience https://api.sitecorecloud.io --allow-write true --client-credentials true --client-id 7PENv87OLuT5clka1TBtQ4UIrzGTCksu --client-secret t58kwCthpU5ZSIZwtDncY0Sbe9o002nGVsTE0azxFTL-Ilqgw1QjR30SRhEKMro9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment