0

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.

0

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.

1
  • 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
0

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">
          <requireAuthentication>false</requireAuthentication>
          <requireApiKey>false</requireApiKey>
        </security>

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

1
  • 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.