How to upload and overwrite an exiting dashboard on Azure Portal?

fhtino 146 Reputation points
2024-01-23T06:11:20.43+00:00

From Azure Portal you can export an existing dashboard as a json file. This allows you to edit the local file locally on your PC. Then you can import back the json to Azure Portal. But when you upload a dashboard-json there is not an option (or I cannot find it) to overwrite an existing dashboard. Instead a new one is created. Then the old one must be manually deleted. If the dashboard is shared, you have to share the new dashboard again and reassign permissions. Is there a way to overwrite an existing dashboard when uploading a dashboard-json file to Portal? If not, I suggest the Portal Team to implement it. My use-case: recently I changed the resource group of many resources referenced by a dashboard. After moving the resources, the dashboard was not able to show data any more. Instead of deleting and recreating many items of the dashboard, I manually edited the json locally, modifying the paths ("/subscription/aaaa/. . . ") and then I uploaded it back to Portal. User's image

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,200 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Renze Yu 26 Reputation points Microsoft Employee
    2024-04-16T06:19:46.7933333+00:00

    I succeeded updating this with Azure PowerShell.

    Steps:

    1. Download the template JSON from Azure Portal. Update it locally per your requirement. Note that there is a place holder "localtion": "INSERT LOCATION" in the exported template. Update it to the desired region to avoid failure when upload.
    2. Get-AzPortalDashboard to get your dashboard name. It may differ from the name you see in Azure Portal.
    3. Set-AzPortalDashboard to update the existing shared dashboard.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.