pnp / pnp/pnpframework

Issue getting the library audience to work with Apply-pnpProvisioningTemplate

Open
#473 0 comments 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

When activating the modern audience targeting on a library, retrieving the template using get-pnpProvisioningTemplate and applying it on another site using apply-pnpProvisioningTemplate, the audience column does not work as intended.

steps to reproduce:
1 - Create 2 empty sharepoint sites
2 - Go into the library settings of the Site Pages library of 1 of the sites
3 - In audience targeting settings, set the "Enable audience targeting" checkbox
4 - Get the provisioning template of the site with get-pnpProvisioningTemplate
5 - Apply the retrieved provisioning template on the second site
6 - Go into the second site, create a new Site Page
7 - Open the page details panel and try to put an Azure AD group as the audience in the Audience column

The audience column will empty itself after entering a value. This problem is also there when you go into the Site Pages, and edit the properties (show actions (vertical ellipsis) -> more -> properties on any site page). But when you add the column audience to the view, the audience that have disappeared in the property panel will be displayed.

This problem is not on every library, for example, following the same steps but using a new document library instead of the site pages library will not have the same problem, but this problem also shows itself on another document library specific to a project, so the problem isn't only related to the Site Pages.

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

Reproduce the issue with get-pnpProvisioningTemplate and apply-pnpProvisioningTemplate using Site Pages and a document library, following the listed SharePoint steps. Trace how audience targeting is provisioned and verify the fix by confirming that an Azure AD group remains selected in the page properties panel after applying the template.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.