Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I use this API to automatically refresh a dataset via a Powershell script with a Service Principal, however when I run the script I get this error in the dataset.
Do you know why?
My script :
$IDWKS = Get-PowerBIWorkspace -Name 'WKS - [REC] FINANCE'
$IDDTS = Get-PowerBIDataset -WorkspaceId $IDWKS.Id
Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/groups/$($IDWKS.Id)/datasets/$($IDDTS.Id)/refreshes" -Method POST -Body ('$($IDDTS.Id)')
Do exactly as the error message says. Refresh the credentials in the dataset settings page. Credentials do expire, service principal or not.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 |