When we use Sitecore CLI sometimes, we land up in getting the below error,
"Make sure the GraphQL service is installed and available".
This issue can happen in two different cases,
Scenario 1: If you dont have the Management Services package installed in your sitecore instance.
Ref this link:
https://doc.sitecore.com/xp/en/developers/101/developer-tools/sitecore-management-services.html
https://dev.sitecore.net/Downloads/Sitecore_CLI.aspx
Download the Sitecore Management Services Module ZIP Package compatible with your Sitecore version.
Check the relevant compatibility table in the below kb article.
https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1000576
Post installation of the management services package, your CLI should start working.
Scenario 2: If the instance that you are configuring CLI for is configured to be on http protocol.
The CLI requires your instance to be https with a valid SSL certificate instaled in it.
Ref the below article for the steps on how to get a Self Signed SSL Certificate specific to your domain name, and make them as a trusted certificate.
Run the below command from your command prompt under the solution folder,
dotnet sitecore login --authority https://<<IdentityServerDomain>> --cm https://<<SitecoreInstanceDomain>> --allow-write true
Post this command, your user.json file content would look like this,

No comments:
Post a Comment