Pnp-powershell: Get-PnPApp does not list apps installed from store

Created on 11 Oct 2018  Â·  10Comments  Â·  Source: pnp/PnP-PowerShell

Reporting an Issue or Missing Feature

Missing Feature

Expected behavior

Get-PnPApp should return all apps installed on the site including those installed from the store. Get-PnPAppInstance does this but is deprecated.

Actual behavior

Get-PnPApp only returns apps from the tenant or site catalog.

Steps to reproduce behavior

Install an app from the store
Get-PnPApp

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?

SharePointPnPPowerShellOnline 3.2.1810.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

All 10 comments

Same issue here. When you run Get-PnPAppInstance to get the App ID and try to install the app the following error is returned:

Install-PnPApp : {"error":{"code":"-1, Microsoft.SharePoint.Client.ResourceNotFoundException","message":{"lang":"en-US","value":"Exception of type 'Microsoft.SharePoint.Client.ResourceNotFoundException' was thrown."}}} At line:1 char:1

Any update on this?

@blair24 change your $ErrorActionPreference to "Stop" on a try catch.

did you try use the Get-PnPListitem ? @kutschinsl

I'm not sure how Get-PnPListItem would be relevant?

It is possible to get the same information or maybe more using the list item for tenant and site collection locations.

EDIT:

with the Get-PnPListItem there is more information available in the script

The issue is that Get-PnPApp does not retrieve information from apps installed from the Microsoft store.
Get-PnPAppInstance does do this but it is marked as deprecated.
Could you explain how to use Get-PnPListItem to retrieve information about an App that has been installed from the Microsoft store?

Do you have idea where the app is located?

On Tue, 11 Jun 2019, 20:31 Luke Kutschinski, notifications@github.com
wrote:

The issue is that Get-PnPApp does not retrieve information from apps
installed from the Microsoft store.
Get-PnPAppInstance does do this but it is marked as deprecated.
Could you explain how to use Get-PnPListItem to retrieve information about
an App that has been installed from the Microsoft store?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/SharePoint/PnP-PowerShell/issues/1738?email_source=notifications&email_token=ACNFYLQWZUJ4ON7XU4CSVWDPZ74RFA5CNFSM4F23EU22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOH5OQ#issuecomment-500989626,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACNFYLXIGAHIJOCZSMTVCTDPZ74RFANCNFSM4F23EU2Q
.

I wish I knew - however apps from the store behave differently than those installed locally on the tenant or site catalog.

To me it doesn't make sense why Get-PnPAppInstance would be deprecated in favor of Get-PnPApp because they are returning different information. For example the App ID and the App Instance ID are different. In addition Get-PnPAppInstance give you information about the state of the app on the current site which is useful for provisioning scripts. Get-PnPApp only returns metadata about the app in the catalog which as you mentioned can be returned also with Get-PnPListItem.

To add to the above, see the output when running the two commands against the same web:

PS C:> Get-PnPAppInstance | Format-List Title, Id
WARNING: The command 'Get-PnPAppInstance' is obsolete. Use Get-PnPApp instead

Title : Nintex Workflow for Office 365
Id : d251dae2-6b5a-4a18-bfce-a1884eded954

PS C:> Get-PnPApp | Format-List Title, Id

Title : SharePointAppPart
Id : cb4c7fcf-751c-49cf-88a1-4b94a7c45599

Title : sampleAppPart
Id : 7f54213e-db0e-4518-ab8d-7c29b0897511

Following this, is there any way to install a provider hosted add-in from app store using ALM API?

Was this page helpful?
0 / 5 - 0 ratings