I have a powershell script that will allow me to add links to the Global navigation in my O365 Sharepoint sites, but I would like to add "Audience" limitations so only members of specific AD groups can see certain links.

I am using a variation of the script provided by Vadim Gremyachev here: https://sharepoint.stackexchange.com/a/167545/68868.

Function AddNavigationNode([Microsoft.SharePoint.Client.NavigationNode]$ParentNode,[string]$Title,[string]$Url){
   $context = $ParentNode.Context
   $Node = New-Object Microsoft.SharePoint.Client.NavigationNodeCreationInformation 
   $Node.Title = $Title
   $Node.Url = $Url 
   $Node.AsLastNode = $true

I do not see any properties of the Microsoft.SharePoint.Client.NavigationNodeCreationInformation type to allow me to enter the AD group.

Any Ideas?


In SharePoint the navigation itself has no permissions to be set. Rather every entry (as long as the target is part of SharePoint) is security trimmed by it's target.

As a SharePoint-User I will never see navigation-entries to which I am unable to navigate. (As long as one of the default SharePoint navigation-providers is used, that is.)

  • Can you please explain the statement "As long as one of the default SharePoint navigation-providers is used, that is"? What I am seeing is that I add a link to another Sharepoint site in the Global Navigation, and all users are able to see the link, even if they are not a member of a sharepoint group that has been given permission to view, edit, modify or other to the target site. The only way I found to hide the link is to add an AD group to the "Audience" field on the link properties. – ddraeger Jul 21 '17 at 12:58
  • Security Trimming only works within the site collection. If a link in the global nav points to a site in a different site collection, it is not trimmed automatically, it must have an Audience assigned to it to hide it from others who do not have access. That is what I am trying to do. – ddraeger Oct 4 '17 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.