Is there a way to "trust" an SharePoint Add-in/App after it has been uploaded to the app catalog? Or eventually before/when it is added.

enter image description here

The App is an SharePoint Add-in (.app file) and is hosted on Azure as a Web App. The installation prosess is: a Site Design triggers a Flow that activates a Function that executes a PowerShell script with Apply-PnPTemplate.

On Azure there is no connection to SharePoint so I guess this stops the installation.

When the App is added manually to a site there is a consent dialog popping up, and is there a way to avoid this? (with powershell or in the SharePoint admin center, or maybe something else)

Appreciate any thoughts and answers

2 Answers 2


You should try ALM API:

ALM APIs provide simple APIs to manage deployment of your SharePoint Framework solutions and add-ins across your tenant.

With PnP-PowerShell you can add your app:

Add-PnPApp -Path ./myapp.sppkg -Scope Tenant

Deploy it:

Publish-PnPApp -Identity <app id> -SkipFeatureDeployment -Scope Tenant 

And install at any particular site:

Install-PnPApp -Identity <app id> -Scope Tenant

Office 365 CLI also has corresponding APIs.

  • I tried adding the App to the app catalog again with PowerShell and then Publish-PnPApp with correct ID -Scope Tenant and also -SkipFeatureDeployment parameters. But it fails: "Operation is not valid due to the current state of the object." Seems to be a known issue: github.com/SharePoint/PnP-PowerShell/issues/1296
    – Dogemaster
    Dec 18, 2018 at 10:01

Have you tried if setting the Tenant scope permission level to FullControl could fix the issue?

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.