PnP-PowerShell icon indicating copy to clipboard operation
PnP-PowerShell copied to clipboard

Cannot install App with Install-PnPApp

Open pkbullock opened this issue 6 years ago • 6 comments

###Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:###

Reporting an Issue or Missing Feature

Getting error using Install-PnPApp

image

This is installing an app into an Office 365 group SharePoint site

Error: Install-PnPApp : {"odata.error":{"code":"-2147024809, System.ArgumentException","message":{"lang":"en-US","value":"appId\r\nParameter name: Specified value is not supported for the appId parameter."}}} At line:1 char:1

  • Install-PnPApp -Identity 0920443c-322a-43b2-ae78-57950c37ce46
  •   + CategoryInfo          : WriteError: (:) [Install-PnPApp], Exception
      + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Apps.InstallApp
    
    

Expected behavior

Install app using new ALM APIs

Query, this is an app using the App Model rather than a SPFX app, does that matter?

Actual behavior

Error.

Steps to reproduce behavior

Install App to Apps Catalog Get ID of App Install App

Which version of the PnP-PowerShell Cmdlets are you using?

  • [ ] PnP PowerShell for SharePoint 2013
  • [ ] PnP PowerShell for SharePoint 2016
  • [X] PnP PowerShell for SharePoint Online

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

2.22.1801.0

How did you install the PnP-PowerShell Cmdlets?

  • [ ] MSI Installed downloaded from GitHub
  • [X] Installed through the PowerShell Gallery with Install-Module
  • [ ] Other means

pkbullock avatar Jan 25 '18 10:01 pkbullock

I think this might be an API error, documentation issue perhaps or between the computer and the chair.

I cannot seem to get this to work using REST Call: https://docs.microsoft.com/en-us/sharepoint/dev/apis/alm-api-for-spfx-add-ins

Section: Install solution package from tenant app catalog to SharePoint site

My script works because I can call other endpoints i.e. /_api/web ok.

The user account I am using is set to Targeted Release, I assume these APIs are available in tenants. Paul

pkbullock avatar Jan 26 '18 13:01 pkbullock

It is not working for me either, i get this Error : Install-PnPApp : {"odata.error":{"code":"-1, System.ServiceModel.ProtocolException","message":{"lang":"en-US","value":"The remote server returned an unexpected response: (405) Method Not Allowed."}}}.

SvenWensing avatar Jan 30 '18 08:01 SvenWensing

I am also having the same issue: Install-PnPApp : {"odata.error":{"code":"-1, System.ServiceModel.ProtocolException","message":{"lang":"en-US","value":"The remote server returned an unexpected response: (405) Method Not Allowed."}}}.

Is there an alternate way using ALM REST APIs?

ammarg52 avatar Feb 06 '18 00:02 ammarg52

Same here . getting AppId error Install-PnPApp : {"odata.error":{"code":"-2147024809, System.ArgumentException","message":{"lang":"en-US","value":"appId\r\nParameter name: Specified value is not supported for the appId parameter."}}} At line:1 char:1

  • Install-PnPApp -Identity 00c04de0-5331-4b44-b3f0-60e5b188dba3
  •   + CategoryInfo          : WriteError: (:) [Install-PnPApp], Exception
      + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Apps.InstallApp
    

prawnz avatar Feb 07 '18 14:02 prawnz

I'm having the same issue installing an app on a site where the app already exists in the app catalog. Has anyone been able to resolve or work around the issue?

ITAndy23 avatar Apr 23 '18 20:04 ITAndy23

I had the same issue. What I did was export a site template on one SP Online tenant and an import on another. I thought, since the same app is installed in both environments it would have the same ID. This doesn't seem to be the case. The ID is different between tenants. If you are having the same issue you can use Get-PnPApp to find all available apps and their IDs.

I am using SharePointPnPPowerShellOnline version 3.26.2010.0

GitHubO365 avatar Jan 13 '21 15:01 GitHubO365