Forum Discussion
Rest API datasets error PowerBISqlCommandTimeout
Hello
When running the rest api call:
Managed to solve the issue by adding this before the webcall:
$client = [System.Net.Http.HttpClient]::new()$client.Timeout = 300Happy weekend everybody!
4 Replies
- ibarrauSuper User
Hi. Is that all the error? can you check for a status code and text of the response? that might helps us understand more about the issue.
Regards,
- AAAAFrequent Visitor
Thanks for checking.
That is all the error message unfortunately.
If instead I use the MicrosoftPowerBIMgmt.Data Get-PowerBIDataset method in PowerShell:
Get-PowerBIDataset -Scope Organization
I get this error:Get-PowerBIDataset: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
I've no idea where to change the timeout.
Thanks
- ibarrauSuper User
That's weird. A request will always response a status code.
Check adding a "Top" or "First" parameter on the MicrosoftPowerBIMgmt.Data for getting a small number. If that's not working, then you might have an access or permission issue with that token.
Regards,
- AAAAFrequent Visitor
Managed to solve the issue by adding this before the webcall:
$client = [System.Net.Http.HttpClient]::new()$client.Timeout = 300Happy weekend everybody!