2

I'm having a problem with Sitecore 10. I made a page that should only be seen by people who log in. I used the require login setting for this page from the security editor. But it's not working the way I thought it would.

Here's what's happening:

I log into Sitecore and go to the page. Instead of the page, I get an access denied message. It looks like Sitecore doesn't know I'm logged in. It says the user is extranet\anonymous.

Even debugging the page after logged in the Sitecore.Context.User.Name is extranet\anonymous

enter image description here

I found something interesting. When I remove this part from identityserver.xml, the problem goes away

<ApiScopes>
    <SitecoreProfileApi>
      <Name>sitecore.profile.api</Name>
      <DisplayName>Sitecore Profile API Scope</DisplayName>
    </SitecoreProfileApi>
</ApiScopes>

<Scopes>
    <SitecoreProfileApi>sitecore.profile.api</SitecoreProfileApi>
</Scopes>

Why does this fix the issue? Is it okay to just remove these lines, or is there a better way to do this? After removing the code, the azure ad login button is missing.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.