Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Team,
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).)
Note: i am running this command on Mac
Solved! Go to Solution.
HI @kanth999,
I think you may miss the required part in the request so these requests do not work.
It works well when I test the script with all required parameters: (since the API has no response so I check that in my workspace and you can find the dataset has been updated correctly)
Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Docs
Test script:
$Body ="{'notifyOption'='NoNotification'}"
Invoke-PowerBIRestMethod -Url 'datasets/62b66b9e-a296-439f-8fb2-95b526196c13/refreshes' -Method Post -Body $Body
Regards,
Xiaoxin Sheng
HI @kanth999,
I think you may miss the required part in the request so these requests do not work.
It works well when I test the script with all required parameters: (since the API has no response so I check that in my workspace and you can find the dataset has been updated correctly)
Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Docs
Test script:
$Body ="{'notifyOption'='NoNotification'}"
Invoke-PowerBIRestMethod -Url 'datasets/62b66b9e-a296-439f-8fb2-95b526196c13/refreshes' -Method Post -Body $Body
Regards,
Xiaoxin Sheng
Can you please let me know, is there are any documents that will run the PowerShell commandlet in Mac os?, Mac OS is suitable to run the PowerShell commands ?
HI @kanth999,
If the modules do not require any additional package that your system does not support, you can also run these on the mac os system.
I check the document and found it seems not to include any additional software requirements so I think these scripts may also work on your device. (prerequisites are for PowerShell itself: windows system PowerShell 3.0 and .net 4.7.1, other types of system PowerShell core support and PowerShell core v6)
Power BI Cmdlets reference | Microsoft Docs
Regards,
Xiaoxin Sheng
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |