I am currently following the Sitecore CLI Documentation and testing it out on one of my local sitecore environment.

I am executing the command

dotnet sitecore ser pull

and I am getting this error.

You are not authorized to perform the task you are attempting. You may need to be assigned additional permissions.

Anyone know how to resolve this? Thanks in advance.


Assuming you are using Admin or some other account to log in (sitecore login --cm ... --authority https://..., is someone else in your group also using Sitecore CLI? do you have a .sitecore directory? If so then there is a user.json file in there, which contains the token. Try deleting that file and logging in again. The user.json should not be checked in to source control.

  • I am only using a local environment and only use administrator user. I have already tried deleting the file and logging in again but still the same.
    – Jovit Mayo
    Sep 18 '20 at 6:33

I don't know if this is recommended to update the settings on the config "Sitecore.Services.GraphQL.Serialization.config" but it does resolve my issue by updating the "requireAuthentication" node to false(Default: true).

<security type="Sitecore.Services.GraphQL.Hosting.Security.GraphQLSecurity, Sitecore.Services.GraphQL">

I am now able to pull the items that I want to serialize.

  • Indeed it's not recommended as anyone could call the endpoint and change data Sep 21 '20 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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