I have a SharePoint publishing site with anonymous access with domain eg xxx.xxxxxxxx.com. Whenever I request the following URL it is asking me for credentials.


The above URL points to the pages which are Documents and Libraries. I don't want the site to ask for credentials for the above URL. The following will be my home page. https://xxx.xxxxxxxx.com/EN/Pages/Default.aspx

So I don't want my SharePoint site to ask for credentials if the URL is pointing to Documents and Libraries. In this scenario I want the URL to be redirecting to the home page. Also, I don't want anonymous users to access the page library or any administrator features.

I have done some R&D on my part but haven't got any solution. Some suggested using SharePoint:SpSecurityTrimmedControl for hiding the elements for the anonymous users, but I don't think it is useful for what I want to achieve. Here is the link that suggested SharePoint:SpSecurityTrimmedControl https://techcommunity.microsoft.com/t5/sharepoint-developer/how-to-hide-login-prompt-for-sharepoint-2016-admin-url-s-via/m-p/354539

Below is the screenshot of what I don't want to show to the anonymous users.

enter image description here


1 Answer 1


When you request the URL https://xxx.xxxxxxxx.com/CN/Pages and the credentials box pops up, which means that anonymous users are trying to access the page library without the required permissions.

Please deactivate "Limited-access user permission lockdown mode" site collection feature to make anonymous users have permission to pages library.

enter image description here

Then you type the url https://xxx.xxxxxxxx.com/CN/Pages, there will be no login prompt.

In addition, SharePoint:SpSecurityTrimmedControl allows the conditional display of content depending on the user’s permission, but it cannot control the Windows credential box.

  • Thanks for the reply. But I don't what to give anonymous users permission to page library. As mentioned in my question I want to redirect them to the Home page. Jan 4, 2021 at 7:32
  • Per my test URL redirect will not compliant on this issue.
    – Julie_MSFT
    Jan 7, 2021 at 7:34

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.