I am encountering an issue during the XMCloud SXA setup, specifically when trying to sync the CLI content. The error message I receive is:

CM host is incorrect: https://xmcloudcm.localhost/sitecore/api/management.
Please login with the right cm hostname or manually fix the user.json file

However, my instance seems to be working fine, and I can access the Sitecore client using the https://xmcloudcm.localhost URL.

Here is my user.json file -

  "endpoints": {
    "xmCloud": {
      "allowWrite": false,
      "host": "https://xmclouddeploy-api.sitecorecloud.io/",
      "authority": "https://auth.sitecorecloud.io/",
      "accessToken": "########",
      "refreshToken": "########",
      "refreshTokenParameters": {
        "organization": "#####"
      "clientId": "########",
      "variables": {
        "xmCloudMonitoringHost": "https://xmcloud-monitoring-api.sitecorecloud.io/"
      "audience": "https://api.sitecorecloud.io"
    "default": {
      "ref": "xmcloud",
      "allowWrite": true,
      "host": "https://xmcloudcm.localhost",
      "variables": {}
    "local": {
      "ref": "xmcloud",
      "allowWrite": true,
      "host": "https://xmcloudcm.localhost",
      "variables": {}
  "$schema": "./schemas/UserConfiguration.schema.json"

When I attempt to access https://xmcloudcm.localhost/sitecore/api/management, I receive the error message: {"errors":[{"message":"Authentication required."}]}. To bypass this authentication issue, I also tried setting <requireAuthentication> to false as well.

I encountered this error when running the up.ps1 file and also when using commands like dotnet sitecore ser push and dotnet Sitecore index schema-populate.

enter image description here

I've attempted various troubleshooting steps, including:

  • Running docker down followed by docker up.
  • Deleting all images and starting from scratch.
  • Deleting the user.json file to allow it to be auto-generated.
  • Restarting the system.
  • Repeating the setup process from the beginning, but the issue persists.

Any insights or guidance on how to resolve this issue would be greatly appreciated. Thank you!

2 Answers 2


We were able to identify the root cause of the issue! the issue was because the entry for xmcloudcm.localhost was commented out in the host file, It prevented the system from resolving the hostname to, resulting in the error you encountered during the XMCloud SXA setup.

By simply uncommenting the entry in the host file (removing the # in front of it), allowed our system to correctly resolve xmcloudcm.localhost to, which resolved the issue.


First, it looks like something is missing from the user.json at the end:

  "$schema": "./schemas/UserConfiguration.schema.json",
  "defaultEndpoint": "default"

Add the defaultEndpoint to your user.json. try the pull and see if the error persists:

dotnet sitecore ser pull --verbose

If error persists, Make sure you are connected to the correct environment:

dotnet sitecore connect --ref xmcloud --cm http://xmcloudcm.localhost --allow-write true -n default

Try to pull again, if still you have the same error, please share your cli version and config, you can find it in .config/dotnet-tools.json

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.