Audience Targeting in list/library doesn't work probably after applied PnP Template
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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