Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
$workspaceId
$profileId
# Construct the headers and URL for the API call
$SPHeader = @{'X-PowerBI-profile-id' = $profileId}
$url = "https://api.powerbi.com/v1.0/myorg/admin/groups/$workspaceId"
$body = @{
"logAnalyticsWorkspace" = @{
"subscriptionId" = "subscriptionId"
"resourceGroup" = "resourceGroupName"
"resourceName" = "LogAnalyticsWorkspaceName"
}
}
# Make the API call
$response = Invoke-PowerBIRestMethod -Method 'Patch' -Url $url -Body $body -Verbose
$response | ConvertTo-Json
When you Invoke-PowerBIRestMethod you use relative URIs, not the full URL (you would use the full URL with Invoke-RestMethod)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 56 | |
| 55 | |
| 36 | |
| 18 | |
| 14 |