Access Denied on Document Library webpart in modern pages

%3CLINGO-SUB%20id%3D%22lingo-sub-312182%22%20slang%3D%22en-US%22%3EAccess%20Denied%20on%20Document%20Library%20webpart%20in%20modern%20pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-312182%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20use%202%20document%20library%20webparts%20in%20our%20modern%20team%20site%20landing%20pages%20-%20one%20for%20Shared%20Documents%20which%20everyone%20has%20access%20to%2C%20and%20another%20for%20Internal%20Documents%20where%20we%20restrict%20permissions%20only%20to%20internal%20users.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUntil%20recently%2C%20this%20works%20really%20well.%26nbsp%3B%20Internal%20users%20will%20see%20contents%20on%20both%20webparts%2C%20while%20external%20users%20will%20see%20an%20Access%20Denied%20image%20in%20place%20of%20the%20Internal%20Documents%20webpart.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20since%20yesterday%20our%20external%20users%20are%20totally%20unable%20to%20access%20the%20page.%26nbsp%3B%20They%20are%20thrown%20to%20the%20full%20page%20Access%20denied%20page.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20please%20advise%20if%20this%20is%20now%20the%20expected%20behaviour%20or%20if%20there's%20a%20better%20way%20of%20showing%20the%202%20libraries%20on%20the%20same%20page%26nbsp%3B%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ENick%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-312182%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%20Denied%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EModern%20Page%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWebPart%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-324349%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20Denied%20on%20Document%20Library%20webpart%20in%20modern%20pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-324349%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20cannot%20we%20just%20hide%20the%20document%20library%20web%20part%20instead%20of%20showing%20it%20with%20an%20access%20denied%20error%3F%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F63424%22%20target%3D%22_blank%22%3E%40Bruno%20Aleixo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-323478%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20Denied%20on%20Document%20Library%20webpart%20in%20modern%20pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-323478%22%20slang%3D%22en-US%22%3E%3CP%3Ethe%20access%20denied%20redirect%20should%20be%20fixed%20in%20the%20near%20future%20as%20a%20fix%20has%20been%20done%20and%20deploying%20to%20production%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320487%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20Denied%20on%20Document%20Library%20webpart%20in%20modern%20pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320487%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20been%20doing%20the%20same%20as%20a%20quick%20workaround.%26nbsp%3B%20The%20issue%20is%20that%20our%20external%20users%20can%20still%20see%20the%20message%20%22Drag%20files%20here%22%20which%20is%20causing%20confusion.%26nbsp%3B%20I%20had%20to%20inject%20CSS%20through%20an%20spfx%20webpart%20to%20hide%20it.%26nbsp%3B%20Also%2C%20I'm%20worried%20that%20a%20future%20release%20from%20Microsoft%20suddenly%20causes%20this%20security%20change%20to%20show%20the%20restricted%20files%20to%20our%20externals%20which%20is%20very%20unacceptable.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20about%2050%20pages%20affected%20by%20this%20issue.%26nbsp%3B%20I%20am%20fixing%20each%20one%20on%20demand%20but%20it%20has%20already%20compromised%20our%20end%20user's%20confidence%20in%20using%20SharePoint%20as%20a%20platform%20for%20document%20management.%20I%20have%20raised%20a%20ticket%20to%20MS%20and%20they%20have%20acknowledged%20the%20bug%20but%20hasn't%20come%20back%20since%20for%20a%20resolution.%26nbsp%3B%20Hopefully%20a%20more%20elegant%20and%20streamline%20solution%20is%20provided%20asap.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320413%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20Denied%20on%20Document%20Library%20webpart%20in%20modern%20pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320413%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20having%20the%20same%20issue%20-%20this%20used%20to%20work%20and%20now%20it%20does%20not%2C%20but%20I%20think%20I%20found%20a%20workaround.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20created%20a%20custom%20permission%20that%20contains%20only%20the%20%22View%20Application%20Pages%22%20permission.%20Then%20I%20granted%20that%20permission%20on%20the%20secured%20library%20to%20all%20users.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20verified%20that%20this%20allows%20the%20webpart%20to%20display%2C%20but%20that%20files%20get%20security%20trimmed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20anyone%20else%20can%20test%20this%20and%20point%20out%20any%20unexpected%20consequences%2C%20I'd%20appreciate%20feedback.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-312813%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20Denied%20on%20Document%20Library%20webpart%20in%20modern%20pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-312813%22%20slang%3D%22en-US%22%3E%3CP%3Eok%20thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-312768%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20Denied%20on%20Document%20Library%20webpart%20in%20modern%20pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-312768%22%20slang%3D%22en-US%22%3E%3CP%3EI%20normally%20open%20support%20premier%20between%20this%20link%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fadmin.microsoft.com%2FAdminPortal%2FHome%23%2Fhomepage%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fadmin.microsoft.com%2FAdminPortal%2FHome%23%2Fhomepage%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20click%20in%20%22do%20you%20need%20help%3F%22%20in%20bottom.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EEverton%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-312731%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20Denied%20on%20Document%20Library%20webpart%20in%20modern%20pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-312731%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Juan%20Carlos%2C%20how%20do%20I%20open%20a%20support%20ticket%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-312184%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20Denied%20on%20Document%20Library%20webpart%20in%20modern%20pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-312184%22%20slang%3D%22en-US%22%3EBest%20you%20can%20do%20here%20is%20to%20open%20a%20support%20ticket...if%20this%20was%20working%20until%20now%20and%20nothing%20has%20changed%20in%20the%20site%2C%20it%20might%20happen%20Microosft%20has%20updated%20the%20WebParts%20and%20the%20update%20is%20causing%20this%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2272450%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20Denied%20on%20Document%20Library%20webpart%20in%20modern%20pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2272450%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F195866%22%20target%3D%22_blank%22%3E%40Li%20Su%3C%2FA%3E%26nbsp%3BHave%20you%20found%20any%20work%20around%20for%20this.%20I%20am%20also%20facing%20the%20issue.%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

 

We use 2 document library webparts in our modern team site landing pages - one for Shared Documents which everyone has access to, and another for Internal Documents where we restrict permissions only to internal users.

 

Until recently, this works really well.  Internal users will see contents on both webparts, while external users will see an Access Denied image in place of the Internal Documents webpart.

 

However, since yesterday our external users are totally unable to access the page.  They are thrown to the full page Access denied page.

 

Could you please advise if this is now the expected behaviour or if there's a better way of showing the 2 libraries on the same page ?

 

Thanks,

Nick

9 Replies
Best you can do here is to open a support ticket...if this was working until now and nothing has changed in the site, it might happen Microosft has updated the WebParts and the update is causing this

Thanks Juan Carlos, how do I open a support ticket ?

 

I normally open support premier between this link: 

https://admin.microsoft.com/AdminPortal/Home#/homepage

 

So I click in "do you need help?" in bottom.

 

Thanks

Everton

 

 

I'm having the same issue - this used to work and now it does not, but I think I found a workaround.

 

I created a custom permission that contains only the "View Application Pages" permission. Then I granted that permission on the secured library to all users.

 

I verified that this allows the webpart to display, but that files get security trimmed.

 

If anyone else can test this and point out any unexpected consequences, I'd appreciate feedback.

I've been doing the same as a quick workaround.  The issue is that our external users can still see the message "Drag files here" which is causing confusion.  I had to inject CSS through an spfx webpart to hide it.  Also, I'm worried that a future release from Microsoft suddenly causes this security change to show the restricted files to our externals which is very unacceptable.

 

We have about 50 pages affected by this issue.  I am fixing each one on demand but it has already compromised our end user's confidence in using SharePoint as a platform for document management. I have raised a ticket to MS and they have acknowledged the bug but hasn't come back since for a resolution.  Hopefully a more elegant and streamline solution is provided asap.

the access denied redirect should be fixed in the near future as a fix has been done and deploying to production

 

Thanks

Hello, cannot we just hide the document library web part instead of showing it with an access denied error? @Bruno Aleixo 

@Li Su Have you found any work around for this. I am also facing the issue. 

Thanks.