Cha74
July 22, 2022, 9:11am
1
Here is my code:
$sourceDatasetGroupId = Get-PowerBIWorkspace -Name 'WKS DEV Azure Pipeline'
Write-Output $sourceDatasetGroupId.Id
$sourceDatasetId = Get-PowerBIDataset -WorkspaceId $sourceDatasetGroupId.Id
Write-Output $sourceDatasetId.Id
$body = @{
updateDetails = @(
@{
name = "WKS_NAME_PARAM"
newValue = "WKS"
}
)
}
$jsonPostBody = $body | convertTo-JSON
$uri = "https://api.powerbi.com/v1.0/myorg/groups/$($sourceDatasetGroupId.Id)/datasets/$($sourceDatasetId.Id)/Default.UpdateParameters"
Invoke-PowerBIRestMethod -Uri $uri -Method Post -Body $jsonPostBody -Verbose
Here is the error I have but I don’t understand why
Someone can help me ?
Thanks
Olaf
July 22, 2022, 9:21am
2
But the error is pretty obvious. There is no parameter with the name Uri. The correct parameter name is Url … or in capitals URL - not URI.
Here for reference the help topic:
Invokes a REST request against the Power BI service using the profile you're logged in with. The REST verb can be specified using the -Method parameter. The -Body parameter is required for the verbs POST, PUT, and PATCH. Before you run this command,...
Cha74
July 22, 2022, 9:26am
3
Thank you for the answer I made the change but I still have an error
Olaf
July 22, 2022, 9:40am
4
My french is not good enough anymore but the error message is another one now. And the return code 403 from the verbose output indicates that this access is forbidden .
BTW: When you post error messages please do not post images of them. Instead post the plain text and format it as code.
Thanks in advance