Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add-PnPCustomAction gives error when used for SPFx extensions #1048
Reporting an Issue or missing feature
When using Add-PnPCustomAction and specifying a ClientSideComponentId (e.g. when working with SPFx extensions), I expect to be able to successfully register the new Custom Action.
I seem to see this behaviour, which doesn't seem right:
Steps to reproduce behavior
Add-PnPCustomAction -Name $spfxExtName -Group $spfxExtGroup -Title $spfxExtTitle -Description $spfxExtDescription -Location $spfxExtLocation -ClientSideComponentId $spfxExtension_GlobalHeaderID
(where $spfxExtGroup is either "" or "MyGroup")
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
How did you install the PnP-PowerShell Cmdlets?
Thanks for any help! :)
I'm seeing what is likely user error – "Add-PnPCustomAction : Parameter set cannot be resolved using the specified named parameters."
Here's my PS command (leveraging your sample):
Here are my values for each of the variables:
See anything I could be missing here?
I'm still having issues with this 'SharePointPnPPowerShellOnline' on version '2.22.1801.0'
I have tried with different group properties values and none work. I'm also getting an error 'Parameter set cannot be resolved using the specified named parameters.' when the -ClientSideComponentId -ClientSideComponentProperties are set
@raymondlittle100 as SickB0t mentioned you will need to leave off -Description and -Group but you must have -ClientSideComponentId to do so.
As an example:
@VesaJuvonen should the documentation be updated to reflect this? Currently -Group and -Description are marked as required when in the case of Application Customizers you must explicitly not provide them.