Wednesday, 1 April 2020

Solution to SharePoint Navigation Managed Metadata Access denied error

We have a brand new SharePoint Modern Team Site, Publishing feature of site and site collection have been enabled too.

Steps to produce access denied error(My ID have admin access but using UI, I am not allowed to solve this issue).

Steps to navigate to site settings in Modern SharePoint Site :
Click on gear box symbol which present on right side of page --> Site Information -->
View all site settings

Once site settings page will open then we have to click on Navigation which is under "Look and Feel" section

Now, Site Settings --> Navigation Setting page will open.
On this page we have to select Managed Navigation for Global Navigation as well as Current navigation and In Managed Navigation Term select Term Store Navigation which we have created for this site.

After select Navigation term-set click on OK button and here we land to Access denied error page.
Solution :
First step we have to enable custom script
Follow the below steps to "Enable" the custom script feature.
Step 1 - Open your Office 365 Admin Portal.
Step 2 - Select SharePoint from left navigation, as shown below.
Step 3 - On SharePoint admin page, select 'Settings'. It will navigate to the Settings page and then you have to click on classic settings page as shown in below image.


For all this step you must have that ID which have admin access or full access of Tenant.

After doing above steps also if  access denied error persist then follow below step using SP Online Management Shell follow these steps:

Download the latest SharePoint Online Management Shell.
Connect to SharePoint Online as a global admin or SharePoint admin in Office 365. 
Open Microsoft SharePoint Online Management Shell and enter below commands:
$orgName="<name of your Office 365 organization, example: contosotoycompany>"
Connect-SPOService -Url https://$orgName-admin.sharepoint.com
Microsoft SharePoint Online Management Shell dialog box will open, type the account name and password for a SharePoint administrator account, and then click Sign in.
Follow the instructions in the Microsoft SharePoint Online Management Shell dialog box to provide the additional authentication information, such as a verification code, and then click Sign in.
Run the below command.
Set-SPOsite <SiteURL> -DenyAddAndCustomizePages 0

Above commands will solve your problem!!!




No comments:

Post a Comment

Solution to SharePoint Navigation Managed Metadata Access denied error

We have a brand new SharePoint Modern Team Site, Publishing feature of site and site collection have been enabled too. Steps to produce a...