Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
@ links to members
I am trying to refresh the PoweBI dataset from PowerBI rest API using Powershell getting below error can you please help me how to fix the issue
using command
Invoke-PowerBIRestMethod -Url "datasets/19b9e00-e8f2-4f81-baae-e2ee907af256/refreshes" -Method Post
getting error
Invoke-PowerBIRestMethod: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
You're missing some syntax. Here's what works for me.
$body = "{`n `"notifyOption`": `"MailOnFailure`",`n}"
$headers = Get-PowerBIAccessToken
$headers.Add("Content-Type", "application/json")
Try
{
$data_refresh= Invoke-RestMethod -Uri 'https://api.powerbi.com/v1.0/myorg/groups/GROUPID/datasets/DATASETID/refreshes' -Method 'POST' -Headers $headers -Body $body
Write-Host "Refresh Completed! " -ForegroundColor "Green";
}
Catch
{
Write-Host "Failed to Refresh Data! " -ForegroundColor "Red";
Write-Host "StatusCode:" $_.Exception.Response.StatusCode.value__
Write-Host "StatusDescription:" $_.Exception.Response.StatusDescription
}
Hi,
thanks for your reply ,
I am using MAC OS and installed the Powershell Install-Module -Name MicrosoftPowerBIMgmt command when i try lo login powerbi getting this issue and also when i execute the above commands not able to run getting issue of below
any idea how we can use
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |