prompt page of autentication in some site when clicking pdfs anonymously in SharePoint Server 2016

Flórida da Graça Botelho Araújo 201 Reputation points
2023-01-31T17:19:07.68+00:00

SharePoint 2016

In the central administration web application authentication providers I have two zones:

It was detected that in the internet zone (www.xpto.pt) there are subsites that allow opening PDFs and others that trigger the credentials popup.

That is, in www.xpto.pt/site1 it does not allow documents to be opened, because it asks for credentials and in www.xpto.pt/site2 there is no problem.

It was compared on both sites:

  • Permissions: OK
  • Features active: OK

After searching, I found this site:

https://www.sharepointdiary.com/2014/05/how-to-enable-anonymous-access-in-sharepoint-2013.html

In the central Administration apparently it is OK.

I think the problem might be there. That is, at the portal level at www.xpto.pt/site2 Anonymous Access, should be active and at www.xpto.pt/site1 not.

The problem is that I am not able to login at www.xpto.pt/site1.

I can only log in at http://internet.xpto.pt.

Any idea how I can Log in to your SharePoint site as a site collection administrator.

Is it possible to enable via powershell anonymous access to the entire web site?

Thanks

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,418 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xyza Xue_MSFT 28,126 Reputation points Microsoft Vendor
    2023-02-01T02:41:06.48+00:00

    Hi @Flórida da Graça Botelho Araújo ,

    You need to set your account as a site collection administrator,then you can Log in to your SharePoint site as a site collection administrator. Please refer to: 3 ways to make a user a Site Collection Administrator

    It is possible to enable anonymous access to the entire web site using powershell.

    PowerShell to Set anonymous access on specific SharePoint sites:

    Add-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
     
    $web = Get-SPWeb https://sharepoint.crescent.com/sites/operations
    #Enabled -  lists and libraries; On - Entire web site ; Disabled - Self explanatory 
    $web.AnonymousState = [Microsoft.SharePoint.SPWeb+WebAnonymousState]::Enabled
    $web.Update()
    

    Referenc: https://www.sharepointdiary.com/2014/05/enable-anonymous-access-using-powershell.html

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Flórida da Graça Botelho Araújo 201 Reputation points
    2023-02-01T12:04:19.1666667+00:00

    Thanks

    With your suggestion I was able to solve. Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.