Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Set-PnPApplicationCustomizer fails to update ClientSideComponentProperties #4753

Open
1 of 6 tasks
YuriySamorodov opened this issue Feb 24, 2025 · 1 comment
Open
1 of 6 tasks
Labels
bug Something isn't working

Comments

@YuriySamorodov
Copy link
Contributor

YuriySamorodov commented Feb 24, 2025

Reporting an Issue or Missing Feature

I'm reporting an issue with the Set-PnPApplicationCustomizer cmdlet not properly updating ClientSideComponentProperties.

Expected behavior

When executing Set-PnPApplicationCustomizer with updated ClientSideComponentProperties, I expect the customizer's properties to be permanently updated with the new tracking ID value.

Actual behavior

After running Set-PnPApplicationCustomizer to change the trackingID property, a subsequent Get-PnPApplicationCustomizer shows that the property value was not updated - it still shows the original value. Even setting the ClientSideComponentProperties to $null does not make any difference.

Image

Steps to reproduce behavior

# 1. Connect to SharePoint site
Connect-PnPOlnine https://contoso.sharepoint.com/sites/Marketing

# 2. Check current application customizer properties
$customizerId = "a3cf2fa-6f14-44f0-892e-add9d7a3d561"
Get-PnPApplicationCustomizer -Identity $customizerId | fl *

# 3. Attempt to update the trackingID property
Set-PnPApplicationCustomizer -Identity $customizerId -ClientSideComponentProperties '{"trackingID":"GTM-SAMPLE1"}'

# 4. Verify the update (shows original "G-SAMPLE123" value instead of "GTM-SAMPLE1")
Get-PnPApplicationCustomizer -Identity $customizerId | fl *

# 5. Setting to null works, but removes all properties
Set-PnPApplicationCustomizer -Identity $customizerId -ClientSideComponentProperties $null
Get-PnPApplicationCustomizer -Identity $customizerId | fl *

What is the version of the Cmdlet module you are running?

PnP.PowerShell version 2.99.145 (nightly)

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@YuriySamorodov YuriySamorodov added the bug Something isn't working label Feb 24, 2025
@KoenZomers
Copy link
Collaborator

Looks like you're providing the clientSideComponentId as the -Identity. It should be the -Id instead (c84b9595-...). Can you try it with that instead and add -Verbose? This will reveal if it found a customaction to update or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants