Error when deploying add-ins right after provisioning a new teamsite
Category
- [ ] Question
- [ ] Typo
- [X] Bug
- [ ] Additional article idea
Expected or Desired Behavior
When adding a new provider hosted App/Add-in right after a new teamsite in SharePoint Online is provisioned, the add-in installs correctly
Observed Behavior
When adding a new provider hosted App/Add-in right after a new teamsite is provisioned, in about 50% of the cases this results (after about 25/30 minutes) in an error message 'Sorry, something went wrong with adding the app. Click to retry.' in the site contents of the particular site.
Steps to Reproduce
-
Provision a new teamsite with PowerShell (which uses the CreateAsync method of PnP-Sites-Core, which then calls the '_api/GroupSiteManager/CreateGroupEx' REST method) Used PowerShell code the provision the teamsite: $creds = Get-Credential Connect-PnPOnline -Url "https://
.sharepoint.com/sites/mysitecollection" -Credentials $creds New-PnPSite -Type TeamSite -Title "mynewteam" -Alias "mynewteam" -
Go to the Site Contents of a provisioned teamsite
-
Add a provider hosted App. This results in the error in about 50% of the time.
p.s. we see it happen more often in our production tenant than in our DEV/TST tenant
@advdberg - thank you for your feedback. In order to help us investigate this issue could you please repro the issue and go to the site contents after it fails, click the ... on the app, choose details and it will give you a correlation ID as well as the failure. Could you send us that correlation ID as well as the URL of your site collection (and the time/day that you tried installing the app).
Thanks! Graham
Thanks for your response Graham!
I’ve reproduced the issue today (2018-01-30 between 8.20 PM +1 and 8.40 PM +1) on several (7) sites. If I go to the … on the app, I get to the details. When I click the 1 behind the Install Errors, a blank screen appears and the only thing I can do is navigate back to the previous page by using the browser back button. So I can’t give you the correlation ID nor the failure message.
An example of a site where it failed is this one: https://ctbfacilitair.sharepoint.com/sites/AVDB20180130c. So when navigating on that site to the details of the app (https://ctbfacilitair.sharepoint.com/sites/AVDB20180130c/_layouts/15/AppMonitoringDetails.aspx?AppInstanceId=6091dc0f-6e6a-4ce5-98d3-ac4a524678c8) I can click the 1 behind the ‘Install Errors’ label but just a blank page appears.

Regards, Ad
Thanks for that info, we have the logs and will investigate this issue soon. Just to be clear though, you are not blocked on this correct? You can go and add the app shortly after the team site is created, it's just that it fails if you create an app right away?
Thanks, we (and our customers) have to workaround this manually because we're working with an automated provisioning engine which will end up creating not completely provisioned teamsites, because the apps are part of the ready-to-use sites we want to provision. So we're not completely blocked but it does disturb our automated provisioning process.
It's not completely clear to me what you mean with 'shortly', but we see that when we add (provider hosted) apps after a certain period (sometimes 30 minutes, sometimes a couple of hours) they can be installed/created/activated properly.
@advdberg - Sorry about the super slow response on this. I have now looked into the logs that I got from your issue, and we were failing to get a user token from AAD which caused the app to fail to install. However, I wanted to repro the issue, but wasn't able to do so. Are you still seeing this issue? Just want to make sure it is still a concern for you.
Thanks for your response and investigation. Last week we tested thoroughly on our different tenants and it seems we connot reproduce it anymore either (at least not in the frequency it used to appear). So for now we can assume this issue as closed. If we run into this again and it's reproducable on our own or customer's tenant, we'll re-open it again. Again thanks for the support!
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