SharePoint Online hide "site contents" and "site usage" page (modern sites)

Copper Contributor

I have a scenario with external users.

 

I created a custom permission level for these users. The custom permission level is a copy of the default "Read" permission level, but I unchecked the "View application pages" permissions.

 

The external users are however still able to see the site contents page and, even worse, the 'site usage' page.

 

I also activated the "Limited-access user permission lockdown mode" site collection feature. And I tried to work with limited access for external users, but then they don't have access at all.

 

Is there a way to achieve what I want? A permission level where (external) users are not able to see site contents and site usage page?

 

Thanks in advance!

52 Replies

@Ramiz 

 

Hey! Sorry for being so late. Its important to note that this will only work on MODERN sites and pages. I have tested and seen that it will work on MODERN lists and libraries.

 

Any thing classic and it will not work. Hope this helps.

@phil333 Thank you again, this did the trick! What can I say, you are a savior :)

 

All the best,

 

Paul.

@phil333 
 I am using sharepoint online modern experience. My issue is in navigation. When I navigate though list or library the extension doesnt work but on refreshing the page it works. I am checking other blogs as well about rendering and architect of sharepoint that how it loads the page partially. I am still not able to solve this issue. Can u help me in that?

@Ramiz 

 

Ill do best to try. So you say your trying to hide the recycle bin right? And much like the site contents gear, it loads after the page does?

 

You could try putting a console log before what ever code you have to execute. That way it will at least let you know its running.

Also this may be redundant, but the code I provided only runs based off permission. Are you testing this with an un-elevated account?

 

 

 

@phil333  

I am using modern SharePoint and user is limited as well. I am attaching a video for your reference that whats the issue I am facing. I have alert and Dialog messages in my extension. You will see when I am navigating the extension code doesn't trigger but after refreshing the page it works. Thats my problem. Have a look at it.

DEMO 

Also for your referencing there was something on ELIO  blogs about the page transition and issue in spfx extension while navigating. I tried this as well but no luck so far.

@TristonT  I tried the solution, it works but my navigation has stopped showing up. My navigation is basically just 3 links to 3 different view of the same list. when i access the link my manually i do get access to it though. 

 

I tried re-enabling the view application pages permission back then my navigation show up. But the issue with site content and site usage access come back 

That helped me a lot. Thank you!
Does anyone have any solution about hiding/disabling the 'Send By Email' link, which keeps appearing on all new Sharepoint pages. One would assume that there should be a feature, which would allow his link to be hidden. It is quite time-consuming trying to get Sharepoint-permissions, tied down, to relevant levels, of users. It seems to be a task, whereby, when issue appears to be solved, that some other thing, is appearing on the screen. I would like to make contact with someone, in Microsoft, who is responsible for Sharepoint 365. These issues, seem to be in Sharepoint 365, for quite some time.
@phil333, so we ran into another challenge with this. We have set up a wiki library for wiki pages as a knowledge base for our users. We have managed to hide the gear icon from the entire site including the main page of the wiki library but now when a visitor goes into a wiki page, that pesky gear icon is showing again and allows users to see shared with and site contents. Has anyone else run into this issue and resolved it? We are using a Communication Site template. Thanks in advance for any ideas.

I don't have a solution to this I'm afraid, but as former owner of a wiki development company I'm still surprised that anybody uses Microsoft's wiki in SharePoint. It was rubbish when it was released all those years ago and never got better because they never put any effort into developing it. At my company we now just use ordinary site pages for collaboration and knowlegebases.

 

Rob
Los Gallardos

Thank you Rob, yeah those wiki libraries are kind of useless and don't even provide basic functionality like a table on contents. This pretty much seals my fate and using regular site pages seems like the only solution. I did manage to find an app developer that is creating a solution to be able to copy and paste an entire word document into a site page including images in one web part and are working on adding the table on contents feature as well.

Best,

Paul.
This solution worked for me beautifuly. Telling where to go to change the settings was cruciual here as I'm not an IT person and not very familiar with the different Sharepoint settings.
Thanks very much.

Hi @phil333 and others,

I too found this thread quite relevant and useful even in 2022. That means Microsoft isn't coming forward to allow advance customization and such communities will have a rescue.

The problem with the extension is that it is making the site "Not secure" for people with edit permissions. Is it supposed to be the case or am I missing anything in the process?

 

KrishanG_0-1649144526423.png


Regards,
Krishan