0

During installation of Sitecore Experience Commerce 9, i am getting below exception at GetIdServerToken step.

Get Token From Sitecore.IdentityServer Install-SitecoreConfiguration : The remote server returned an error: (400) Bad Request. At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\Public\Install-SitecoreConfiguration.ps1:253 char:21 + & $entry.Task.Command @paramSet | Out-Default + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

When i checked the log file in SitecoreIdentityServer, i got below information.

 15:34:45  Using an in-memory repository. Keys will not be persisted to storage.
 15:34:45  Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
 15:34:45  Creating key {ea66393e-7351-46a2-8e91-ceb572ff4a1e} with creation date 2018-06-06 10:04:45Z, activation date 2018-06-06 10:04:45Z, and expiration date 2018-09-04 10:04:45Z.
 15:34:45  No XML encryptor configured. Key {ea66393e-7351-46a2-8e91-ceb572ff4a1e} may be persisted to storage in unencrypted form.
 15:34:45  You are using the in-memory version of the persisted grant store. This will store consent decisions, authorization codes, refresh and reference tokens in memory only. If you are using any of those features in production, you want to switch to a different store implementation.
 15:34:46  Request starting HTTP/1.1 POST http://localhost:5050/connect/token application/x-www-form-urlencoded 102
 15:34:46  Invoking IdentityServer endpoint: "IdentityServer4.Endpoints.TokenEndpoint" for "/connect/token"
 15:34:47  User authentication failed: "invalid_username_or_password"
 15:34:47  "{
  \"ClientId\": \"postman-api\",
  \"ClientName\": \"Postman API\",
  \"GrantType\": \"password\",
  \"Scopes\": \"EngineAPI openid postman_api\",
  \"UserName\": \"admin\",
  \"Raw\": {
    \"username\": \"admin\",
    \"scope\": \"openid EngineAPI postman_api\",
    \"grant_type\": \"password\",
    \"password\": \"***REDACTED***\",
    \"client_id\": \"postman-api\"
  }
}"
 15:34:47  Request finished in 1475.2586ms 400 application/json; charset=UTF-8

Any pointer would highly be appreciated.

0

I got it resolved.

I just needed to pass domain with the username to the script. I prefixed domain name i.e. in this case \"UserName\": \"sitecore\\admin\" for the user and it worked.

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.