SharePoint 2013 Hide Ribbon from Anonymous users

InfoPath alternatives for form designing SharePoint

In this post we will discuss how we can hide ribbon from anonymous users in SharePoint 2013. If your site is accessible by anonymous users then we can hide the ribbon from anonymous users by doing the following customization.

Also read:
– Add an app page showing loading sharepoint 2013

– View ULS Logs using SharePoint LogViewer in SharePoint 2013

– Apps for SharePoint 2013 NOW SharePoint 2013 Add-ins

Here we need to modify the master page, so first take a backup of the master page or you can create a new master page from the exising master page and can modify on that.
Here we are going to modify in the seattle.master page
, so I have taken a backup of the master page.

Now open your SharePoint designer, click on Master Pages from left side Site Objects. It will open the master page list. Select the particular master page Right click Check out, then Right click and click on Edit File in Advanced Mode.

Then in the master page search for <div id=”s4-ribbonrow”>

Modify that line withe style=”Display:none” attribute which should look like below:

<div id=”s4-ribbonrow” style=”display:none”>

Then go to the end tag. You can put mouse cursor in the above line then right click and click on “Select Tag”. This will select the whole tag. And below to the end tag write the below stuff:

<SharePoint:SPSecurityTrimmedControl ID=”HideRibbonRow” runat=”server” PermissionsString=”ManageWeb”>

<script type=”text/javascript”>

document.getElementById(“s4-ribbonrow”).style.display = “block”;

</script>

</SharePoint:SPSecurityTrimmedControl>

Now Save the master page and login with anonymous user, the ribbon will not appear.

Similar SharePoint 2013 Tutorials

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →

Leave a Reply