Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[BUG] PnP Provisioning does not handle Dashboard Web Parts correctly

Aperta
#5,396 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
powershell
Ambito
tooling

Direzione di ricerca

Inizia dalla gestione del provisioning PnP per il Custom CanvasControl e i relativi JsonControlData serializzati, quindi confronta i valori di DashboardId e dashboardURL in Home.aspx con il Dashboard.aspx sottoposto a provisioning. Riproduci lo scenario con Dashboard.aspx, i relativi ACEs e il Dashboard for Viva Connections web part, quindi verifica che le schede sottoposte a rendering corrispondano a Get-PnPVivaConnectionsDashboardACE.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Related to #5374

Summary

When provisioning a Communication Site using a PnP Provisioning template, the Dashboard for Viva Connections web part on Home.aspx may not render the ACEs stored on Dashboard.aspx.

The issue appears related to the web part’s serialized personalizationData.DashboardId, which includes the Site Pages list item ID of Dashboard.aspx.

The DashboardId has this shape: {sitecollectionid}_{siteid}_{sitePagesListId}_{dashboardPageListItemId}

So, the provisioned web part can end up pointing at the wrong dashboard (page) item unless the token is correctly resolved or post-processed. When this is the case, the Dashboard Web Part displays the default set of ACEs instead of those in Dashboard.aspx.

I think this all stems from the fact that PnP Provisioning treats the Dashboard Web Part as a Custom Web Part. Here is the relevant section of the XML:

<pnp:CanvasControl WebPartType="Custom" JsonControlData="{&quot;webPartId&quot;:&quot;9cc0f495-db64-4d74-b06b-a3de16231fe1&quot;,&quot;rteInstanceId&quot;:null,&quot;addedFromPersistedData&quot;:true,&quot;reservedHeight&quot;:243,&quot;reservedWidth&quot;:1204,&quot;controlType&quot;:3,&quot;id&quot;:&quot;d8c79f95-65f8-4b12-b558-85fbf55fa1a7&quot;,&quot;position&quot;:{&quot;controlIndex&quot;:3,&quot;zoneIndex&quot;:5,&quot;sectionIndex&quot;:1,&quot;sectionFactor&quot;:100,&quot;layoutIndex&quot;:1,&quot;zoneId&quot;:&quot;fb7ff564-69ef-49d3-a5e2-2a049096ce08&quot;},&quot;emphasis&quot;:{&quot;zoneEmphasis&quot;:0},&quot;flexibleLayoutPosition&quot;:{&quot;lg&quot;:{&quot;x&quot;:0,&quot;y&quot;:4,&quot;w&quot;:70,&quot;h&quot;:14}},&quot;properties&quot;:{&quot;numVisibleCards&quot;:6,&quot;dashboardURL&quot;:&quot;https://{fqdn}{site}/SitePages/Dashboard.aspx&quot;,&quot;personalizationData&quot;:{&quot;DashboardId&quot;:&quot;{sitecollectionid}_{siteid}_{listid:Site Pages}_7&quot;,&quot;DashboardFormFactor&quot;:&quot;Mobile&quot;,&quot;DashboardCardDetails&quot;:[],&quot;LastModifiedDate&quot;:&quot;2026-06-30T20:58:14.8267543Z&quot;},&quot;title&quot;:&quot; &quot;},&quot;serverProcessedContent&quot;:{&quot;htmlStrings&quot;:{},&quot;searchablePlainTexts&quot;:{},&quot;imageSources&quot;:{},&quot;links&quot;:{}},&quot;dynamicDataPaths&quot;:{},&quot;dynamicDataValues&quot;:{},&quot;dataVersion&quot;:&quot;1.0&quot;}" ControlId="9cc0f495-db64-4d74-b06b-a3de16231fe1" Order="3" Column="1" />

Expected behavior

When a site is provisioned with:

  • Dashboard.aspx
  • ACEs on Dashboard.aspx
  • a Dashboard for Viva Connections web part on Home.aspx

…the Dashboard web part should render the same ACEs returned by:

Get-PnPVivaConnectionsDashboardACE

Actual behavior

After provisioning:

  • Dashboard.aspx contains the expected ACEs.
  • Get-PnPVivaConnectionsDashboardACE returns the expected ACEs.
  • But the Dashboard for Viva Connections web part on Home.aspx may show a different set of ACEs.
  • Clicking See all from the Dashboard web part opens a URL like:
    /sites/[siteName]/_layouts/15/sharepointapp.aspx?disableRedirect=true&isFromDashboardWP=true

rather than directly rendering the Dashboard.aspx page canvas.

This makes troubleshooting confusing because:

  • Dashboard.aspx may appear correct - but not usually because the ACEs don't seem to be provisioned correctly, either.
  • The Dashboard web part has dashboardURL pointing to Dashboard.aspx.
  • But the rendered cards may not match the ACE controls on Dashboard.aspx.
Lingua principale
C#
Stelle
906
Fork
408
Merge medio
2g 19h
PR unite (30g)
12

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pnp/powershell

Tutte le issue di pnp/powershell

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.