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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Get the dataset ID and add it to a POWER BI REST API command

I would like to retrieve the id of a dataset via this command :

 

Get-PowerBIDataset -Scope Organization -Name "REPORT FINANCE DEV"

 

Then, I would like to integrate it in this command instead of the hard number sequence.

 

$body ='{
"updateDetails": [
{
"name": "WKS_NAME_PARAM",
"newValue": "WKS"
}
]
}'
Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/datasets/ 1cd873be-50b9-4b71-a35f-a58b7dd9f6c2/Default.UpdateParameters" -Method Post -Body $body

 

Can anyone help me ?

 
Thanks in Advance, 
 
Charline
2 REPLIES 2
Hariharan_R
Solution Sage
Solution Sage

Hi @Anonymous 

Use the below script.

 

$dataset = Get-PowerBIDataset -Scope Organization -Name "SharePoint_Web"
$dataset_id=$dataset.id


$body ='{
"updateDetails": [
{
"name": "WKS_NAME_PARAM",
"newValue": "WKS"
}
]
}'

$url = "https://api.powerbi.com/v1.0/myorg/datasets/ $dataset_id/Default.UpdateParameters"

Invoke-PowerBIRestMethod -Url $url -Method Post -Body $body

 

Thanks

Hari

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


My Blog :: YouTube Channel :: My Linkedin


Anonymous
Not applicable

Hi @Hariharan_R

 

I tried your code but I got this error.

Charline74_0-1656496100117.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors