PnP Provisioning - Support for target audience in web part?

%3CLINGO-SUB%20id%3D%22lingo-sub-62001%22%20slang%3D%22en-US%22%3EPnP%20Provisioning%20-%20Support%20for%20target%20audience%20in%20web%20part%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-62001%22%20slang%3D%22en-US%22%3E%3CP%3EDoes%20PnP%20support%20specifying%20the%20target%20audience%20when%20deploying%20webparts%20on%20a%20page%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-62960%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20Provisioning%20-%20Support%20for%20target%20audience%20in%20web%20part%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-62960%22%20slang%3D%22en-US%22%3E%3CP%3EI%20don't%20think%20it%20does.%26nbsp%3BPnP%20uses%20the%20export%20of%20a%20webpart%20to%20import%20it.%20Webpart%20export%20doesn't%20include%20audience%20targeting%20info.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20the%20schema%20for%20wikipage%20webpart%20and%20webpartpage%20webpart%20don't%26nbsp%3Bsupport%20audiences.%20I%20have%20seen%20code%20examples%20in%20the%20past%20on%20setting%20audience%20targeting%20with%20CSOM%2C%20so%20you%20could%20build%20your%20own%20provider%20to%20set%20this%20property.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-62560%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20Provisioning%20-%20Support%20for%20target%20audience%20in%20web%20part%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-62560%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20David%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Egood%20question%20have%20not%20seen%20it%20yet%20maybe%20you%20can%20add%20it%20to%20the%20issue%20list%20of%20PNP%20if%20you%20need%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKr%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPaul%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Does PnP support specifying the target audience when deploying webparts on a page?

2 Replies
Highlighted

Hi David,

 

good question have not seen it yet maybe you can add it to the issue list of PNP if you need it.

 

Kr,

 

Paul

Highlighted

I don't think it does. PnP uses the export of a webpart to import it. Webpart export doesn't include audience targeting info. 

 

Also the schema for wikipage webpart and webpartpage webpart don't support audiences. I have seen code examples in the past on setting audience targeting with CSOM, so you could build your own provider to set this property.