Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
AAAA
Frequent Visitor

Rest API datasets error PowerBISqlCommandTimeout

Hello 

 

When running the rest api call: 

Invoke-RestMethod -Uri "https://api.powerbi.com/v1.0/myorg/admin/datasets"  -Headers $token -Method Get
 
I am getting this error (started today):
 
{
    "error": {
        "code""PowerBISqlCommandTimeout",
        "pbi.error": {
            "code""PowerBISqlCommandTimeout",
            "parameters": {},
            "details": []
        }
    }
}
Anybody knows what it could be? I can't find any reference to PowerBISqlCommandTimeout.
 
Thanks 
Miguel
 
 
 
 
 

 

1 ACCEPTED SOLUTION
AAAA
Frequent Visitor

Managed to solve the issue by adding this before the webcall:

$client = [System.Net.Http.HttpClient]::new()
$client.Timeout = 300
 
Happy weekend everybody!
 

View solution in original post

4 REPLIES 4
AAAA
Frequent Visitor

Managed to solve the issue by adding this before the webcall:

$client = [System.Net.Http.HttpClient]::new()
$client.Timeout = 300
 
Happy weekend everybody!
 
ibarrau
Super User
Super 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,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

AAAA
Frequent 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

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,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.