Forum Discussion
Norman Mann
Oct 22, 2016Copper Contributor
Provisioning Metadata Navigation using CSOM
Is it possible to enable Metadata Navigation for a list or libray using CSOM and preferably using PnP PowerShell or the PnP Provisioning framework ?
Norman Mann
Nov 16, 2017Copper Contributor
I have the same problem. Have you ever managed to solve this ?
Jurgen Wiersema
Feb 01, 2018Copper Contributor
Nope!
- Bart-Jan DekkerApr 30, 2018Copper Contributor
Did you enable the Metadata Navigation Feature on the web prior to setting the Property bag? I was able to set the filter fields, without user intervention, using the following PowerShell script:
Enable-PnPFeature -Identity "7201d6a4-a5d3-49a1-8c19-19c4bac6e668" -Scope Web
$list = Get-PnPList "Documents"
$fld = Get-PnPProperty -ClientObject $list -Property "RootFolder"
$props = Get-PnPProperty -ClientObject $fld -Property "Properties"
$props["client_MOSS_MetadataNavigationSettings"] = '<MetadataNavigationSettings SchemaVersion="1" IsEnabled="True" AutoIndex="True">(with contents copied from a correctly configured folder...)</MetadataNavigationSettings>'
$fld.Update()
$list.Update()
$list.Context.ExecuteQuery()