Forum Discussion
rthomas
6 years agoRegular Visitor
Get-PowerBIReport : Operation returned an invalid status code 'TooManyRequests'
I'm using the PowerShell Script from https://insightsquest.com/2019/06/19/power-bi-artifact-to-workspace-relationships/, using my userid/pw to return all workspaces, and reports. essentially looping...
Anonymous
6 years agoNot applicable
Hi rthomas
The 'too many requests' status code would suggest that the API rate limiting is stopping you from getting a complete set of responses. It might be worth trying a short pause within the loop before you call 'Get-PowerBI-Report'
You can get PowerShell to pause by using the 'Start-Sleep' command.
Start-Sleep -Seconds 60
I am not suggesting you use 60 seconds between calls. A couple of seconds should probably do it.
Cheers, Matt