Power BI REST API issue

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

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. :wink:

Here for reference the help topic:

Thank you for the answer I made the change but I still have an error

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