pnp / pnp/pnpframework

Modern Audience Targeting not fully provision fields

Open
#772 3 comments 0 reactions 2 assignees View on GitHub

@patrikhellgren is already working on this.

Since Oct 23, 2022.

area: provisioning ⚙ bug
Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

Raised via Twitter DM:
Hi, my name is Peter, working as a SharePoint consultant in Stockholm. We try to provision modern audience targeting on Site Pages library through PnP PowerShell. Saw in Github that you have been writing the code for PnP Framework enabling Audience targeting. We are able to add the fields and the UI shows Audience targeting is enabled, we have also enabled the site feature. However the fields which holds the group ID (_ModernAudienceAadObjectIds) never gets populated. Have you any idea of what we are missing? Many thanks in advance, have been banging our head around this for a while now.. :)

Ok, I haven't run the provisioning though the PnP Provisoning engine (not been able to get the new schema version to work from PnP Powershell). What I have tried is to do exactly what is done in ListExtensions.cs -> EnableModernAudienceTargeting but from PowerShell. And everything looks great except that the field _ModernAudienceAadObjectIds dont get populated with ids when an audience group is added. (It works if I manualy go in and turn Audience setting off and on again so Im thinking there are som sort of "glue" missing :) Cant really figure out exactly what happens behind the scenes when you press the activate Audience targetting from the UI. (Have you got this working by using the code in ListExtensions.cs?)

Initial investigation - this can be produced and the next steps are to compare the list settings + schema XML to understand if there is a configuration difference.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.