Azure Resource Graph is a service in Azure that allows you to performant resource exploration with the ability to query at scale across a given set of subscriptions so that you can effectively govern your environment. You can get an overview of the resources in different subscriptions, and you can even generate charts. You can run these queries from Azure PowerShell or Azure CLI, or to get a view of these queries, you can use Azure Resource Graph Explorer in the Portal.
As an example, I used Azure Resource Graph queries, to list the agent version of Azure Arc enabled servers.
To share these queries with others, you have a couple of options. You can share it directly within the Azure portal.
Create an Azure Resource Graph Explorer Query Link
But thanks to David Coulter (Microsoft), I learned that you also can simple create URLs, including the Azure Resource Graph query. This is great if you simply create a link and will automatically copy the query to the Azure Resource Graph Explorer.
You can do this by using the following URL and append the URL encoded query to the URL.
Azure Resource Graph Query:
Resources| summarize count()
URL encoded Query:
Complete Azure Resource Graph URL:
So if you click on the following link, it will automatically open the Azure Portal with the above Azure Resource Graph Query:
Thanks again to David Coulter or the tip. I hope this gives you an overview of how you can share the Azure Resource Graph Query using a simple link. If you have any questions, feel free to leave a comment.
To learn more about how to create Azure Resource Graph Queries, check out Microsoft Docs: Starter Resource Graph query samples