2

I am trying to establish Client_credentials authentication flow from my .NET API to fetch the items, sort of like https://doc.sitecore.com/en/developers/93/sitecore-experience-manager/use-bearer-tokens-in-client-applications.html, without Sitecore Context/ libraries in my API.

I have done the configuration changes in the below files

\Config\production\Sitecore.IdentityServer.Host.xml

\sitecore\Sitecore.Plugin.IdentityServer\Config\identityserver.xml 

It should ideally fetch the token from https://identityserver/connect/token

The Postman doesn't generate the token from the above site core URL in spite of passing the below values, It has been a struggle, Anyone who is aware of what I am missing, please?

    <CredentialsClient>
      <ClientId>test</ClientId>
      <ClientName>test</ClientName>
      <AccessTokenLifetimeInSeconds>3600</AccessTokenLifetimeInSeconds>
      <IdentityTokenLifetimeInSeconds>3600</IdentityTokenLifetimeInSeconds>
      <AllowAccessTokensViaBrowser>true</AllowAccessTokensViaBrowser>
      <RequireClientSecret>false</RequireClientSecret>
      <AllowedGrantTypes>
        <AllowedGrantType1>client_credentials</AllowedGrantType1>
      </AllowedGrantTypes>
      <AllowedCorsOrigins>
      </AllowedCorsOrigins>
      <AllowedScopes>
         <AllowedScope1>openid</AllowedScope1>
        <AllowedScope2>sitecore.profile</AllowedScope2>
        <AllowedScope3>sitecore.profile.api</AllowedScope3>
      </AllowedScopes>
      <ClientSecrets>

Does it work only from Code and not from postman or is some configuration missing at site core end?

2nd query is that whether this can be achieved with the Azure Identity provider, If yes kindly share links of external identity provider too.

Friends, Please help. The above code flow

New contributor
sumangala nair is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
3
  • You may want to focus your question into a single question and ask your other queries as separate questions. Nov 26 at 11:05
  • question is a little confusing but for the second part, sitecore.derekc.net/… check this might help maybe. Also, check below sam-solutions.us/… 2 days ago
  • Do you mean to set up Federated Authentication using Client Azure AD? 2 days ago

Your Answer

sumangala nair is a new contributor. Be nice, and check out our Code of Conduct.

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

Browse other questions tagged or ask your own question.