-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
Doc - ReferencePortalfeature-requestThis issue requires a new behavior in the product in order be resolved.This issue requires a new behavior in the product in order be resolved.
Description
Description of the new feature
When creating a dashboard using New-AzPortalDashboard command, there is an issue report regarding the command succeeds but the dashboard fails to render with an error "Dashboard not found".
This is an issue with the underlying REST API (tracked seperately). There's a workaround using Invoke-AzRestMethod and we want it to be documented as an example in the reference doc of New-AzPortalDashboard.
$SubscriptionId = (Get-AzContext).Subscription.Id
$ResourceGroupName = '******'
$DashboardName = '******'
$DashboardPath = "******.json"
$Location = "******"
$ApiVersion = "2022-12-01-preview"
$Dashboard = Get-Content -Path $DashboardPath -Raw | ConvertFrom-Json
$Payload = @{
properties = $Dashboard.properties
location = $Location
} | ConvertTo-Json -Depth 10
Invoke-AzRestMethod -SubscriptionId $SubscriptionId -ResourceGroupName $ResourceGroupName`
-ResourceProviderName "Microsoft.Portal" -ResourceType "dashboards" `
-Name $DashboardName -ApiVersion $ApiVersion -Method PUT -Payload $PayloadProposed implementation details (optional)
No response
Copilot
Metadata
Metadata
Assignees
Labels
Doc - ReferencePortalfeature-requestThis issue requires a new behavior in the product in order be resolved.This issue requires a new behavior in the product in order be resolved.