How to re-point an Azure dashboard to a different subscription | Quisitive
How to re-point an Azure dashboard to a different subscription
September 29, 2020
Cameron Fuller
Learn how to re-point and move an Azure dashboard and its resources to a different subscription and update the existing dashboard.

Recently as part of an initiative to decrease the number of subscriptions in use, we moved one of our Log Analytics workspaces to a different subscription. As a result of the move, the existing Azure dashboard we had in place would no longer function.

To address this, we took the following steps to move resources:

Step 1: Export the existing dashboard to a JSON file.

Step 2: Replace any changed items (subscription #, resource group, workspace name) in the JSON file. Additionally, change the name of the dashboard so it can re-imported and will not impact the current dashboard.

Step 3: Re-import the updated JSON file

Step 4: Re-share the dashboard

Additionally, this blog post discusses how to update existing Azure dashboards to workbook functionality.

Step 1: Export the existing Azure dashboard to a JSON file:

Open the existing dashboard and choose the option “Download”

This will save the dashboard off to a json file.

Step 2: Replace any changed items:

In the file replace any original item values with the appropriate new values (hint: control-h gives you a search and replace option, be sure to check the “Match case” option shown below.

In my case there were changes required for the subscription, resource group and workspace name. To simply this process, record the original values for these fields and then record the new ones somewhere for easy cut and paste.

Tip: To find the values for the subscription, resource group and workspace name open the Log Analytics workspace in the Azure portal and look at the properties for the workspace on the overview tab.

Additionally, substitute the existing dashboard name with something else – such as appending a ” v2″ to the end of the dashboard name both within the document and for the file name to make it easy to keep track of.

Tip: Use https://jsonlint.com/ to validate the json if you have problems getting it to import.

Step 3: Re-import the updated json file:

Return to the Azure portal and your existing dashboard, choose New dashboard and Upload. Point to the updated json file.

Your new dashboard should now be available!

Step 4: Re-share the dashboard:

See this blog post for how to share a dashboard.

Updating existing dashboards to workbook functionality:

Bonus tip: Now that you have your new dashboard, you can easily convert this to use workbooks in place of the existing Log Analytics dashboard functionality. To update these choose the “Update now” option shown below. This will convert the existing dashboard functionality to the new workbooks-based functionality.

Tip: While you can not undo the functionality, you can re-import the original json file you already exported. Having backups for these is very helpful when making enhancements or changes like this.

Before:

After: