-
Notifications
You must be signed in to change notification settings - Fork 162
Description
I have a legacy application that is using OfficeDevPnP Framework which was working fine until Microsoft has changed the authentication strategy with Sharepoint using Azure App Registration. I created a new app registration and granted all the necessary permissions on Sharepoint Application and Delegated permissions. I am able to get the Site app only context and user context as well using AuthenticationManager.
When I am applying the template which had Files and Providers, it is not able to detect files. The code template.Files is returning 0
Appreciate, if someone could highlight what has changed while handling this?
`
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2016/05/ProvisioningSchema">
<pnp:Preferences Author="" Version="1.0">
pnp:Parameters
<pnp:Parameter Key="InfrastructureSiteUrl">/sites/XYZ-Prod</pnp:Parameter>
<pnp:Parameter Key="GroupOwner">zSvc_123@XYZ.com</pnp:Parameter>
<pnp:Parameter Key="ProviderAppUrl">https://app-xyz-prod.azurewebsites.net</pnp:Parameter>
</pnp:Parameters>
</pnp:Preferences>
<pnp:Templates ID="ProvisioningTemplates">
<pnp:ProvisioningTemplate ID="ProvisioningTemplateCopy" Version="1.0"
DisplayName="XYZ Template"
Description="This is the XYZ site collection template">
<pnp:PropertyBagEntries xmlns:pnp="http://schemas.dev.office.com/PnP/2016/05/ProvisioningSchema">
<pnp:PropertyBagEntry Key="fis_SiteType" Value ="XYZ Project Site" Overwrite="true" Indexed="true" />
<pnp:PropertyBagEntry Key="fis_AppUrl" Value="{parameter:ProviderAppUrl}" Overwrite="false" />
</pnp:PropertyBagEntries>
<pnp:Files xmlns:pnp="http://schemas.dev.office.com/PnP/2016/05/ProvisioningSchema">
<pnp:File Src="_catalogs\masterpage\fis\js\main.js" Folder="{masterpagecatalog}/fis/js" Overwrite="true" Level="Published" />
<pnp:File Src="_catalogs\masterpage\fis\js\main(ExternalLandingPage).js" Folder="{masterpagecatalog}/fis/js" Overwrite="true" Level="Published" />
<pnp:File Src="_catalogs\masterpage\fis\js\app.js" Folder="{masterpagecatalog}/fis/js" Overwrite="true" Level="Published" />
<pnp:File Src="Templates\PublishingPages\Home.aspx" Folder="{site}/Pages" Overwrite="true" Level="Published">
<pnp:Properties>
<pnp:Property Key="ContentTypeId" Value="{contenttypeid:Welcome Page}" />
<pnp:Property Key="Title" Value="Home" />
<pnp:Property Key="PublishingPageContent" Value="" />
<pnp:Property Key="PublishingPageLayout" Value="{masterpagecatalog}/fis/PageLayouts/fis_Home.aspx, FIS Home" />
</pnp:Properties>
<pnp:WebParts>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Sections/Files/WebParts/InternalHome/HeaderScriptEditor.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Sections/Files/WebParts/InternalHome/AllDocLibraries.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Sections/Files/WebParts/InternalHome/ProjectSchedule.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Sections/Files/WebParts/InternalHome/ProjectNotes.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Sections/Files/WebParts/InternalHome/ProjectInformation.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Sections/Files/WebParts/InternalHome/ScriptReferences.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Sections/Files/WebParts/InternalHome/ProjectTeam.xml"/>
</pnp:WebParts>
</pnp:File>
</pnp:Files>
<pnp:Providers xmlns:pnp="http://schemas.dev.office.com/PnP/2016/05/ProvisioningSchema">
<pnp:Provider Enabled="true" HandlerType="Xyz.Provisioning.Infrastructure.Providers.NavigationExtensibilityProvider, Xyz.Provisioning.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<pnp:Configuration>
<NavigationProvider id="NavigationProviderConfig" xmlns="http://schemas.somecompany.com/NavigationExtensibilityProviderConfiguration">
<Navigation GlobalNavigationItems="0"
GlobalNavigationOrderFromTop="true"
CurrentNavigationItems="0"
CurrentNavigationOrderFromTop="true">
<NavigationNodeCollection>
<NavigationNode Title="Overview" Url="Pages/default.aspx" NavigationType="0" />
<NavigationNode Title="Documents" Url="Pages/results.aspx" NavigationType="0" />
</NavigationNodeCollection>
</Navigation>
</NavigationProvider>
</pnp:Configuration>
</pnp:Provider>
</pnp:Providers>
</pnp:ProvisioningTemplate>
</pnp:Templates>
</pnp:Provisioning>`