I am creating modern team sites from managed code using PnP Unified Groups utility from PnP core with app-only permissions. This has been working just fine until recently.
Now, the SharePoint site has the status = Creating for a rather long time. E.g. 75 minutes. I check site status with this PnP cmdlet:
Get-PnPTenantSite -Url [someurl] | FT Status
During that period modifications to the site fail with an exception like so:
Microsoft.SharePoint.Client.ServerException: Cannot set properties on site [someurl] because the site is not currently available
Previously (before this error started to occur), the site could be modified even in the Creating state. Also, it typically took 2 to 5 minutes for the status to change to Active.
When status changes to Active everything works as expected. The issue appears on two tenants: a production tenant in EMEA and a MS demo tenant in US region.
Has anyone a work-around for this issue, except for waiting it out?
As of today this is working much better than last week. Now, about 50 % of the sites are created as previously while the rest still has the issue.
I have heard that others are experiencing the same problem. Percentage of 'slow' sites and time to completion varies quite a bit. A new thing I noticed yesterday is that sometimes the group creation does not return a SharePoint URL. After waiting a bit the SharePoint site will be created anyways.
I have been creating about 1000 groups in a production tenant the recent days and noticed one more issue that might be related. In some cases, the site status changes immediately after group creation to Active. This is not really a good thing, because the site creation did not complete so fast. Changes applied to one of these site might fail for random reasons, e.g. Document library does not exist and the like.
One more thing I noticed today. About 10 % of my groups are created without a SharePoint site. When asking for the SharePoint site (drive) via Graph API I receive this error message: Unable to provision resource. Even after waiting for some time (e.g. 24 hours or so) the SharePoint site is NOT provisioned. But, when migrating the group to a Microsoft Team, the SharePoint site is created finally.
Update 2017-10-10 Noticed a new issue today. When accessing a O365 Group after creation I am getting the following exception. Only work-around seems to delete the group and create it again
Exception of type 'Microsoft.Graph.ServiceException' was thrown.: Code: ResourceNotFound Message: Resource provisioning is in progress. Please try again.