I am using the Sitecore CLI to login (interactive) to my local instance and that works fine.

We have a setup for a non-interactive login for the CLI to the cloud dev environment. I wanted to test that locally and it succeeds. I can login and perform tasks.

When I now want to login to my local instance again however I get an error:

Error while getting client credentials token: invalid_client

I am using the commands from the official docs here: https://doc.sitecore.com/xp/en/developers/102/developer-tools/log-in-to-a-sitecore-instance-with-sitecore-command-line-interface.html

2 Answers 2


The issue can be fixed by setting the --client-credentials argument to false in the interactive login command:

dotnet sitecore login --authority https://<Sitecore identity server> --cm http://<Sitecore instance> --allow-write true --client-credentials false

When using the non-interactive login this is set to true. And apparently if you do a new login that argument is not reset to the default (false) so you need to apply it.

A simple fix for something that might be trivial for some but maybe I can save someone time by sharing here.


Try bypass command:

.\up.ps1 -bypass $true
  • Please add more details with your answer. Oct 20, 2022 at 9:16
  • Explain why your command would help OP with his issue
    – Marek Musielak
    Oct 20, 2022 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.