Custom access denied page SharePoint 2013

Last week I was trying to figure out a way to set up  a custom access denied page and found some useful information which I want to share.  Most of the clients and SharePoint users I spoke to always say they don’t want their site to look like SharePoint. When you do not have access to a SharePoint site then you will be directed to this page to request access. When you post a request it will show at the bottom of the message box.

accessdenied

In SharePoint 2013 this page can be easily customized. Below steps should be performed on all the web front ends.

  1. Go to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS
  2. Accessdenied.aspx page will be located here. I took out access AccessRequestsDialog div and added some text to AccessDeniedAdditionalDetails as below. Too small to read I guess , try zoom in please.
  3. accessdenied
  4. You can customize all you want here and create your own access request page.
  5. There is no need to reset IIS and this should take effect right away.
  6. If you do not want to change the existing SharePoint file which Microsoft does not recommend then you can create a folder in Layouts folder called “custom pages” and copy the accessdenied.aspx to this folder and make changes there. But SharePoint does not know about the new page. So you have to execute below power shell but running the SP management shell as farm admin . Set-SPCustomLayoutsPage -Identity “AccessDenied” -RelativePath “/_layouts/15/custompages/AccessDeniedNew.aspx” -WebApplication “http:/mywebapplication/”

Good to know details:

I have read few people saying that some times when you create a new folder and run power shell , the changes you mage will not take effect due to a bug. This happens is SharePoint 2013 SharePoint 2013 Custom Access Denied . And the solution to this is to install April 2014 CU.

Advertisements