3

I'm working on dockerized Sitecore 10.3 solution with JSS and SXA but when I run the below command to serialize my items from Sitecore I get the error invalid_grant.

command

dotnet sitecore ser pull

Error enter image description here

This was working nicely and stopped working suddenly.

1
  • 1
    The reason it stopped working is because when you initially up your containers with the up PowerShell script, it logs in. That login times out after a while, so you will need to log the CLI in again as in your answer.
    – Richard Seal
    Commented Mar 8, 2023 at 21:51

1 Answer 1

9

You just need to login into your Sitecore instance by running the following command from your project root folder.

dotnet sitecore login --authority "https://your.id.host" --cm "https://your.cm.host" --allow-write true

Flags explanation

--auth, --authority Identity authority for the environment, i.e. identity server or AAD tenant URL

--cm Sitecore content management hostname to connect to

--allow-write Enables writing data to the environment

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.