sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

ALM API does not automatically trust a SharePoint-hosted app on installing to a site

Open DanyWyss opened this issue 8 years ago • 5 comments

Category

  • [X ] Bug

Expected or Desired Behavior

When installing a SharePoint-hosted Add-In from the app catalog the app should be trusted on the site collection automatically.

Observed Behavior

After installing the SharePoint-hosted Add-In with site collection scoped permissions the app is deployed to the provided site but not trusted. Trust has to be done manually through the SharePoint UI which destroys the whole purpose of fully automating provisioning of apps using ALM API.

Steps to Reproduce

Prerequisites:

Using ALM API from PnP Powershell (but can be reproduced in any other way of using SharePoint ALM API):

  • Connect to site: Connect-PnPOnline –Url https://yourtenant.sharepoint.com/sites/yoursite
  • Find out the app's Id using: Get-PnpApp
  • Install app to site: Install-PnPApp -Identity <AppId> (where is Id as listed in Get-PnPApp)
  • Go to SharePoint site in browser, navigate to Site Contents and look for installed/installing app
  • Wait until app is fully installed
  • Click on the app to open it's main page You'll get the following error "Access denied: You don't have enough permissions or you don't trust this app." is shown.

To manually trust (which shouldn't be necessary): Go to Site Contents and select "Manage permissions" in the "…" menu for the appropriate app, then click the "here" link in the text "If there's something wrong with the app's permissions, click here to trust it again."

DanyWyss avatar Dec 21 '17 16:12 DanyWyss

Hi @DanyWyss, this has been identified now and we should have it now fixed. We'll test this in following days and hopefully, we can push out the fix to production early January. Really unfortunate one, but we are working on getting it resolved asap.

VesaJuvonen avatar Dec 28 '17 18:12 VesaJuvonen

Hi @VesaJuvonen, great news, can test as soon as the fix is available. Thanks!

DanyWyss avatar Jan 03 '18 12:01 DanyWyss

Sorry for the delay around this. We had some complications with the fix but should have now things again worked out. We will finalize testing early next week and roll out the fix to production asap based on those results. I'll update and close this issue when things have been verified and 100% rolled out to production.

VesaJuvonen avatar Feb 03 '18 00:02 VesaJuvonen

Fix has been now rolled out to production. We do apology delay around this, but the issue is finally fixed. Issue was related on the add-ins and did not include SPFx solutions. Closing this as root cause has been now fixed.

VesaJuvonen avatar Mar 15 '18 09:03 VesaJuvonen

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 28 '20 12:01 msft-github-bot