SOLVED

Deployment of SharePoint navigation items using the provisioning engine ignored

%3CLINGO-SUB%20id%3D%22lingo-sub-8608%22%20slang%3D%22en-US%22%3EDeployment%20of%20SharePoint%20navigation%20items%20using%20the%20provisioning%20engine%20ignored%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-8608%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20are%20deploying%20site%20structure%20using%20a%20PnP%20provisioning%20template%20to%20the%20root%20of%20SharePoint%20site%20collections%20using%20the%20PnP%20Provisioning%20framework.%26nbsp%3BEverything%20gets%20deployed%20except%20navigation%20items.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20narrowed%20the%20situation%20down%20to%20a%20small%20provisioning%20script%20with%20only%26nbsp%3BSecurity%20and%20Navigation%20elements.%20When%20I%20deploy%20this%2C%20the%20security%20element%26nbsp%3Bis%20picked%20up%20by%20the%20provisioning%20engine%2C%20but%20the%20navigation%20element%20not.%3C%2FP%3E%3CP%3EWhy%20is%20this%20not%20working%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%0A%3CPROVISIONING%20pnp%3D%22http%3A%2F%2Fschemas.dev.office.com%2FPnP%2F2016%2F05%2FProvisioningSchema%22%3E%0A%20%20%3CPREFERENCES%20generator%3D%22OfficeDevPnP.Core%2C%20Version%3D2.6.1608.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D3751622786b357c2%22%3E%3C%2FPREFERENCES%3E%0A%20%20%3CTEMPLATES%20id%3D%22CONTAINER-TEMPLATE-7FB72622E1654B1C9765678E8C5093A3%22%3E%0A%20%20%20%20%3CPROVISIONINGTEMPLATE%20id%3D%22TEMPLATE-7FB72622E1654B1C9765678E8C5093A3%22%20version%3D%221%22%20basesitetemplate%3D%22STS%230%22%3E%0A%20%20%20%20%20%20%3CSECURITY%20clearsubscopes%3D%22false%22%3E%0A%20%20%20%20%20%20%20%20%3CADDITIONALOWNERS%3E%0A%20%20%20%20%20%20%20%20%20%20%3CUSER%20name%3D%22c%3A0-.f%7Crolemanager%7Cspo-grid-all-users%2F9fcc7bfd-834f-4f72-89f1-509ad9e9a92f%22%3E%3C%2FUSER%3E%0A%20%20%20%20%20%20%20%20%3C%2FADDITIONALOWNERS%3E%0A%20%20%20%20%20%20%3C%2FSECURITY%3E%0A%20%20%20%20%20%20%3CNAVIGATION%3E%0A%20%20%20%20%20%20%20%20%3CGLOBALNAVIGATION%20navigationtype%3D%22Structural%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CSTRUCTURALNAVIGATION%20removeexistingnodes%3D%22true%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNAVIGATIONNODE%20isexternal%3D%22true%22%20title%3D%22Wikipedia%22%20url%3D%22http%3A%2F%2Fwww.wikipedia.org%22%3E%3C%2FNAVIGATIONNODE%3E%0A%20%20%20%20%20%20%20%20%20%20%3C%2FSTRUCTURALNAVIGATION%3E%0A%20%20%20%20%20%20%20%20%3C%2FGLOBALNAVIGATION%3E%0A%20%20%20%20%20%20%20%20%3CCURRENTNAVIGATION%20navigationtype%3D%22Structural%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3CSTRUCTURALNAVIGATION%20removeexistingnodes%3D%22true%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNAVIGATIONNODE%20isexternal%3D%22false%22%20title%3D%22Start%22%20url%3D%22%2FSitePages%2FHome.aspx%22%3E%3C%2FNAVIGATIONNODE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNAVIGATIONNODE%20isexternal%3D%22false%22%20title%3D%22Project%20team%22%20url%3D%22%7Bsite%7D%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CNAVIGATIONNODE%20isexternal%3D%22false%22%20title%3D%22Work%20docs%22%20url%3D%22%7Bsite%7D%2FWork%20documents%22%3E%3C%2FNAVIGATIONNODE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CNAVIGATIONNODE%20isexternal%3D%22false%22%20title%3D%22Mail%22%20url%3D%22%7Bsite%7D%2FWork%20mail%22%3E%3C%2FNAVIGATIONNODE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CNAVIGATIONNODE%20isexternal%3D%22false%22%20title%3D%22Deliverables%22%20url%3D%22%7Bsite%7D%2FDeliverables%22%3E%3C%2FNAVIGATIONNODE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FNAVIGATIONNODE%3E%3CBR%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%26lt%3Bpnp%3ANavigationNode%20IsExternal%3D%22true%22%20Title%3D%22Wikipedia%22%20Url%3D%22http%3A%2F%2Fwww.wikipedia.org%22%26gt%3B%26lt%3B%2Fpnp%3ANavigationNode%26gt%3B%0A%20%20%20%20%20%20%20%20%20%20%26lt%3B%2Fpnp%3AStructuralNavigation%26gt%3B%0A%20%20%20%20%20%20%20%20%26lt%3B%2Fpnp%3ACurrentNavigation%26gt%3B%0A%20%20%20%20%20%20%26lt%3B%2Fpnp%3ANavigation%26gt%3B%0A%20%20%20%20%26lt%3B%2Fpnp%3AProvisioningTemplate%26gt%3B%0A%20%20%26lt%3B%2Fpnp%3ATemplates%26gt%3B%0A%26lt%3B%2Fpnp%3AProvisioning%26gt%3B%3C%2FSTRUCTURALNAVIGATION%3E%3C%2FCURRENTNAVIGATION%3E%3C%2FNAVIGATION%3E%3C%2FPROVISIONINGTEMPLATE%3E%3C%2FTEMPLATES%3E%3C%2FPROVISIONING%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20managed%20to%20deploy%20the%20navigation%20items%20as%20a%20workaround%20using%20the%20PnP%20PowerShell%20august%202016%20cmdlets%20using%20the%26nbsp%3BAdd-SPONavigationNode%26nbsp%3Bmethod%2C%20but%20I%20would%20like%20to%20transform%20this%20into%20a%20provisioning%20template.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-10903%22%20slang%3D%22en-US%22%3ERe%3A%20Deployment%20of%20SharePoint%20navigation%20items%20using%20the%20provisioning%20engine%20ignored%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-10903%22%20slang%3D%22en-US%22%3E%3CP%3EIssue%20logged%20on%20GitHub%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FOfficeDev%2FPnP-Sites-Core%2Fissues%2F738%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FOfficeDev%2FPnP-Sites-Core%2Fissues%2F738%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-8697%22%20slang%3D%22en-US%22%3ERe%3A%20Deployment%20of%20SharePoint%20navigation%20items%20using%20the%20provisioning%20engine%20ignored%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-8697%22%20slang%3D%22en-US%22%3E%3CP%3ECurrently%20the%20navigation%20component%20only%20works%20for%20publishing%20sites...that%20might%20be%20your%20problem%3F%20If%20you%20need%20it%20for%20regular%20sites%20as%20well%20I%20suggest%20logging%20an%20issue%20in%20the%20PnP-Sites-Core%20repo%20(%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FOfficeDev%2Fpnp-sites-core%2Fissues%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FOfficeDev%2Fpnp-sites-core%2Fissues%3C%2FA%3E)%20or%20alternatively%20propose%20a%20change%20via%20a%20PR.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-8622%22%20slang%3D%22en-US%22%3ERE%3A%20Deployment%20of%20SharePoint%20navigation%20items%20using%20the%20provisioning%20engine%20ignored%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-8622%22%20slang%3D%22en-US%22%3E%3CP%3EShameless%20plug%20%3A)%3C%2Fimg%3E%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FInstantQuick%2FInstantQuick-SharePoint-Provisioning%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FInstantQuick%2FInstantQuick-SharePoint-Provisioning%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20does%20what%20you%20want%20by%20default.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Frequent Contributor

We are deploying site structure using a PnP provisioning template to the root of SharePoint site collections using the PnP Provisioning framework. Everything gets deployed except navigation items.

 

I've narrowed the situation down to a small provisioning script with only Security and Navigation elements. When I deploy this, the security element is picked up by the provisioning engine, but the navigation element not.

Why is this not working?

 

 

<?xml version="1.0"?>
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2016/05/ProvisioningSchema">
  <pnp:Preferences Generator="OfficeDevPnP.Core, Version=2.6.1608.0, Culture=neutral, PublicKeyToken=3751622786b357c2" />
  <pnp:Templates ID="CONTAINER-TEMPLATE-7FB72622E1654B1C9765678E8C5093A3">
    <pnp:ProvisioningTemplate ID="TEMPLATE-7FB72622E1654B1C9765678E8C5093A3" Version="1" BaseSiteTemplate="STS#0">
      <pnp:Security ClearSubscopes="false">
        <pnp:AdditionalOwners>
          <pnp:User Name="c:0-.f|rolemanager|spo-grid-all-users/9fcc7bfd-834f-4f72-89f1-509ad9e9a92f" />
        </pnp:AdditionalOwners>
      </pnp:Security>
      <pnp:Navigation>
        <pnp:GlobalNavigation NavigationType="Structural">
          <pnp:StructuralNavigation RemoveExistingNodes="true">
            <pnp:NavigationNode IsExternal="true" Title="Wikipedia" Url="http://www.wikipedia.org"></pnp:NavigationNode>
          </pnp:StructuralNavigation>
        </pnp:GlobalNavigation>
        <pnp:CurrentNavigation NavigationType="Structural">
          <pnp:StructuralNavigation RemoveExistingNodes="true">
            <pnp:NavigationNode IsExternal="false" Title="Start" Url="/SitePages/Home.aspx"></pnp:NavigationNode>
            <pnp:NavigationNode IsExternal="false" Title="Project team" Url="{site}">
              <pnp:NavigationNode IsExternal="false" Title="Work docs" Url="{site}/Work documents"></pnp:NavigationNode>
              <pnp:NavigationNode IsExternal="false" Title="Mail" Url="{site}/Work mail"></pnp:NavigationNode>
              <pnp:NavigationNode IsExternal="false" Title="Deliverables" Url="{site}/Deliverables"></pnp:NavigationNode>
            </pnp:NavigationNode>
<pnp:NavigationNode IsExternal="true" Title="Wikipedia" Url="http://www.wikipedia.org"></pnp:NavigationNode> </pnp:StructuralNavigation> </pnp:CurrentNavigation> </pnp:Navigation> </pnp:ProvisioningTemplate> </pnp:Templates> </pnp:Provisioning>

 

I've managed to deploy the navigation items as a workaround using the PnP PowerShell august 2016 cmdlets using the Add-SPONavigationNode method, but I would like to transform this into a provisioning template.

 

3 Replies
Highlighted

Shameless plug :) https://github.com/InstantQuick/InstantQuick-SharePoint-Provisioning

 

It does what you want by default.

Highlighted
Solution

Currently the navigation component only works for publishing sites...that might be your problem? If you need it for regular sites as well I suggest logging an issue in the PnP-Sites-Core repo (https://github.com/OfficeDev/pnp-sites-core/issues) or alternatively propose a change via a PR.