pnp / pnp/pnpframework

Audience Targeting in list/library doesn't work probably after applied PnP Template

Open
#477 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

After applied PnP Template where Audience Targeting is enabled in "Site Pages", audience targeting doesn't work probably anymore. Fields _ModernAudienceTargetUserField and _ModernAudienceAadObjectIds were recreated when PnP template was applied. However, when user updates Audience Target in Web UI, only _ModernAudienceTargetUserField is updated and _ModernAudienceAadObjectIds is always empty. This causes audience targeting in the list doesn't work probably. All updated records (_ModernAudienceTargetUserField updated but _ModernAudienceAadObjectIds empty) in the list are missing in FeedTargeted API query.

To remediate this issue, after PnP template is applied, site admin should disable and enable audience targeting again in list settings. These steps remove fields _ModernAudienceTargetUserField and _ModernAudienceAadObjectIds and then recreate them probably.

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.

Research direction

Start by reproducing the reported behavior with a PnP Template that enables audience targeting in Site Pages. Inspect how the template recreates _ModernAudienceTargetUserField and _ModernAudienceAadObjectIds, then verify the FeedTargeted API results after a Web UI audience update; done means targeting works without manually disabling and re-enabling it.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.