I have a document library web part on a web page. Each item in the document library has unique permission so the login user can see the item only after he has been given permission.

Target audience has been applied on the web part. The login user is in the Target Audience SharePoint Group, which is mapped to user's Azure group.

However, several users report they see Web Part Access Denied error when they login . I did some investigation and found the error goes away when an item is granted to the login user. Even the item is deleted later, the login user no longer see the access denied error.

It appears when the error appears when permission has never been granted to a document library item to the login user before. This causes confusion for many new users. Wondering if it is a Microsoft issue or anything can be done to remove the error?

1 Answer 1


From your description, it seems that you are using classic document library Target Audience.

Per my test, I have a document lirbary and set unique permission for files in it, then I set Target Audience to a SharePoint group, the user in this group has no permission for this library.

Then I add the library web part to the page, I could access the page successfully, and there are no files in this library showed for me since I have no limited permission on files:

enter image description here

So I could not reproduce your issue, please feel free to reply if I have missed something.

  • In my case, the user has access to the document library. However, he has access to the files that he is granted permission.
    – MWAN001
    Feb 8, 2021 at 14:00
  • Try to check Limited-access user permission lockdown mode Feature in Site collection features, Deactivate it, please refer to sharepointdiary.com/2018/06/…
    – Julie_MSFT
    Feb 9, 2021 at 6:57
  • the Limited-access user permission lockdown mode Feature is enabled on all sites. Not sure SharePoint ops or Security will allow us to disable it.
    – MWAN001
    Feb 9, 2021 at 15:54
  • I know the issue now: the login user doesn't have access to the document library so until permission of a document library item is granted to him, he gets this access denied error. Looks like the only solution is to write JavaScript code to overwrite this access denied message with more user friendly message
    – MWAN001
    Feb 9, 2021 at 20:59
  • If you have any answers, you can post a reply and mark your reply as an answer, which will be of great help to people who encounter similar problems in this forum. Thank you for your contribution.
    – Julie_MSFT
    Feb 10, 2021 at 6:55

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.