-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
None
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
Describe the bug / error
On the SFPx 1.21 release notes:
the new "personalization" property is indicated to be an array.
That matches what is defined on the SPFx ACE schema:
https://developer.microsoft.com/json-schemas/spfx/adaptive-card-extension-manifest.schema.json
However, the corresponding SP module that defines the adaptive card: https://learn.microsoft.com/en-us/javascript/api/sp-module-interfaces/iadaptivecardextensionmanifest?view=sp-typescript-latest
has "personalization" as a string:
And in fact, that's what we see on SharePoint side: if we don't define the "personalization" property, the call to GetClientSideComponents returns the custom ACE, as seen below:
which has "personalization":"Disallow" (ie, a string - not an array).
Meaning: there's a mismatch between SPFx's Adaptive Card schema and the equivalent SharePoint's typescript definition.
Consequences:
Attempting to define "personalization" on a custom SPFx ACE as an array (regardless of choosing ["Allow"] or ["Disallow"]), makes the custom SPFx ACE incompatible with SharePoint - the extension's .JS file is not even loaded.
Defining "personalization" on a custom SPFx ACE as a string is accepted by SharePoint - and we can see the chosen value on the Client Component surfaced by the call to GetClientSideComponents
Steps to reproduce
- Create basic SPFx extension project (SPFx 1.21)
- On the manifest.json file, include "personalization":["Allow"]
3. Build / bundle/ package, add to app catalog, deploy.
4. Go to a Viva connections dashboard, edit the dashboard, attempt to add your custom card
Card cannot be added at all.
If you have updated a previously deployed SPFx ACE project (ie, a custom ACE without the personalization property, that has been previously added to the Dashboard), you will see the indication the previously added card is no longer available as well.
Checking the sources (browser developer tools), the custom ACE extension (.js) file is not loaded at all.
Expected behavior
We would expect to see what we do when we repeat the same steps, using "personalization":"Allow" instead "personalization":["Allow"] on the manifest.json file:
Card can be added to the dashboard.
On the call to GetClientSideComponents (browser developer tools -> network tab), we see our card details as is defined in SharePoint. And we can check the value associated with card's "personalization" setting - "Allow".
