Get-PnPTenantSite throws error 'The request uses too many resources.'
Category
- [ ] Question
- [ ] Typo
- [X] Bug
- [ ] Additional article idea
Expected or Desired Behavior
Get the tenant site with Get-PnPTenantSite without error
Observed Behavior
Since this morning we get almost everytime the message 'The request uses too many resources.' on getting the tenant site
Sample tenant: ctbteamdev But also on other tenants we intermittently saw the same behaviour since last night
Steps to Reproduce
Execute the following PowerShell
$devcreds = Get-Credential
$newSiteUrl = 'https://xxx.sharepoint.com/sites/modernteamsite'
$adminUrl = 'https://xxx-admin.sharepoint.com'
Connect-PnPOnline -Url $adminUrl -Credentials $devcreds
$site = Get-PnPTenantSite -Detailed -Url $newSiteUrl
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Same behaviour on my tenant. Not only Get-PnPTenantSite but also received it for other commands like 'Apply-PnPTemplate'.
I'm seeing this too a lot. Sometimes error message is "Exception has been thrown by the target of an invocation."
It is not a PnP Issue. Same thing happens with the official SharePoint Online Management Shell using Get-SPOSite CMD. So it is a general SharePoint Online Issue. We are also seeing many tenants beeing affected by this issue.
Having the same issues with doing CSOM calls to get site properties var site = tenant.GetSitePropertiesByUrl(url, false); tenantContext.Load(site, s => s.Status); tenantContext.ExecuteQueryRetry(); => ERROR var status = site.Status;
Same behavior on my tenant since yesterday. FYI the code throwing this exception is
tenantContext.SetSiteProperties(newSiteContext.Web.Url, noScriptSite: false);
There is no previous content loading and tenantContext is a Microsoft.Online.SharePoint.TenantAdministration.Tenant from Microsoft.Online.SharePoint.Client.Tenant object instance.
This bug seems to be random...
Thanks for reporting @advdberg. Thanks, @OliverZeiser for confirming that this also happens outside of PnP components, which is important for troubleshooting and repro. Also thanks to others for confirming the different scenarios where things happen. This is really helpful information.
We are currently investigating and hopefully can work a solution fast.
Please note that if someone is facing similar issues on other APIs, please add them on this thread, so that we can also confirm that the upcoming fix will be working properly.
I'm seeing to the message "Exception has been thrown by the target of an invocation."
@DRamalho92 can you share what did you do for getting this exception... which API, cmdlet or UI functionality was used for seeing the exception. Thx.
@VesaJuvonen When using the PNP PowerShell commnad Get-PnPTenantSite
Having the this exception:
Exception has been thrown by the target of an invocation. At :line:1 char:1
- G <<<< et-PnPTenantSite
@DRamalho92 or anyone else; we can speed up the resolution if someone is willing to give us the FQDN of the tenant they are hitting this on. Otherwise, we'll have to work through to get a repro which will slow us down. Any chance someone wants to DM me on twitter at @zrosenfield with their FQDN so i can pass it along?
@zrosenfield I can't DM you on Twitter, are your Twitter DMs disabled?
@zplume i think it's set so you have to follow me to DM me... I'll try to look at my settings but you can give that a shot at the same time
I am following you already @zrosenfield :)
Thanks
@zplume first, thanks :). second, i think i fixed it... try now
@zrosenfield - yes, that fixed it, I have DM'd
Thanks!
@zrosenfield I still have the error, I've sent a DM on twitter.
Just tested this and got the same on another tenant. Simply using Get-PnPTenantSite on an infinite loop executing this command every 15 seconds and it fails 1 time out of 10, approximately.
I also sent the tenant name as a DM @zrosenfield. Thanks for helping out!
We are getting these as well with some Powershell scripts. We currently have our tenants relaxed for throttling as well for tenant-to-tenant SPO migrations.