Issue: Deploying Application Customizer Using PnP PowerShell #4888
-
I am working on automating the deployment of a Microsoft Clarity Application Customizer to specific SharePoint Online sites using PnP PowerShell. The script uploads the .sppkg package to the Site Collection App Catalog, installs the app and adds the Custom Action to the application customizer. However, I am encountering some odd behavior that is preventing this from working end to end. Expected behaviorWeb Level feature is activated on Actual behaviorWeb Level feature is not activated on Adding it ManuallyIf I add the application to the site manually from the site contents and then run ✅ it works. If I run a check to see the availabe Application Customizers The first entry is created when I install the app through the site contents (web scope). Steps to reproduce behavior
❌doesn't work. If I run a check to see the availabe Application Customizers I only see one entry (site scope) Any assistance or advice would be greatly appreciated. What is the version of the Cmdlet module you are running? Which operating system/environment are you running PnP PowerShell on?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This was performed on a Microsoft Dev tenant using the Global Admin account to call Connect-PnPOnline I assumed being a global admin and the App registration delegated permisions to Sites.FullControl would work. It did not. Problem SolvedI created a new app registration using: Connected using the App Registration only: Ran the code again and Application Customizer deployed correctly and began communicating with Clarity. Thanks, |
Beta Was this translation helpful? Give feedback.
This was performed on a Microsoft Dev tenant using the Global Admin account to call Connect-PnPOnline
Connect-PnPOnline -Url $siteUrl -Interactive -ClientId $clientID
I assumed being a global admin and the App registration delegated permisions to Sites.FullControl would work.
It did not.
Problem Solved
I created a new app registration using:
Register-PnPAzureADApp -ApplicationName "PnP Online" -Tenant xxxxx.onmicrosoft.com -Store CurrentUser
Connected using the App Registration only:
Connect-PnPOnline -Url $siteUrl -ClientId $clientID -ThumbPrint $thumbPrint -Tenant $tenant
Ran the code again and Application Customizer deployed correctly and began communicating with Clarity.
Thanks,
Andrew