Implement support for throttling and automatic retry of any SP http call
Hi,
Microsoft recently has enforced throttling on several api calls. When running several PnP commands, we are getting 503 service unavailable messages or TooManyRequest errors.
For instance on following command: Set-SPOSite $SiteUrl -SharingCapability ExternalUserSharingOnly
For every api call, throttling support should be implemented.
https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online
See ExecuteQueryWithIncrementalRetry extension for implementation.
Which version of the PnP-PowerShell Cmdlets are you using?
- [ ] PnP PowerShell for SharePoint 2013
- [ ] PnP PowerShell for SharePoint 2016
- [ X] PnP PowerShell for SharePoint Online
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing Get-Module -Name *pnppowershell* -ListAvailable)
3.19.2003.0
How did you install the PnP-PowerShell Cmdlets?
- [ ] MSI Installed downloaded from GitHub
- [ X] Installed through the PowerShell Gallery with Install-Module
- [ ] Other means
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
I also experiance a lot of throttling errors with only very simple PowerShell script (iterating over 150 SharePoint sitecollections). Untill now i cannot find a solution for it. I hope Microsoft could give us an solution for this problem. Many people are dealing with it.
is this still an issue?
This is still an issue. We are getting throttling errors when iterating over a number of sites. Is there any way to read the response headers so we can get the "retry-after" header?