Hello,
Is there any way to put a parameter that retrieves a workspace id in the URL of a Power BI REST API ?
$workspace = New-PowerBIWorkspace -Name "WKS TEST"
Add-PowerBIWorkspaceUser -Id $workspace.Id -UserEmailAddress blablablabla -AccessRight Admin
$body ='{"capacityId":"blablablabla"}'
Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/groups/$workspace.Id/AssignToCapacity" -Method Post -Body $body
Below is the code I use.
And here is the error