Querying Azure Resource Graph for Resource Configuration Changes

Azure's Resource Configuration Changes feature has been in public preview for a few days now and I thought we should give it a try and see what it has to offer!

Resource Configuration Changes aims to provide more information on changes applied to Azure resources through Resource Graph Explorer. 

If you search for "Resource Graph" in the Azure Portal search, one of the results will be Resource Graph Explorer:


The look and feel of the Resource Graph Explorer is pretty similar to Log Analytics workspaces:

On the left, we have the tables we can query and in the middle is the well-known query window, where we type and execute our queries.

To get information about the changes that have been applied to Azure resources, we'll be querying the 
resourcechanges namespace:

We can see the available properties to query against by starting with a simple where clause. Let's get all the changes in a specific subscription:

As you can imagine, this query will return a very large dataset. The way I find it easier to filter the results is by the id of the resource that we're interested in or the resource group.

If you know the id of the resource you'd like to know more about, you can use it in the filter like below:

Here we've also projected the properties property of the result to get the information regarding the change that has been applied. If you click on the See details button, a window will pop up and show the JSON data in a more readable format.
In this case, the only change we have is the creation of the vNet resource.

I have now added a subnet to the vNet and we're going to use the very same query to get the changes. Hopefully, there will be another row in the results that will show the update:

As you can see in the result, a change was performed by a user where a new subnet property has been inserted into the specific resource.

You may be wondering why I'm using the startswith verb in the query. It's because I do not want to miss any resources that may be child resources of the resource in question. Knowing the way identities are assigned in Azure, the id of a child resource always starts with the id of the parent.

More information on this new feature is available over here. This documentation link also contains some useful query examples that will get you started, like the changes during the last day or the deletions in a resource group. 

Popular posts from this blog

Domain Controller Machine Password Reset

Configuring a Certificate on Exchange Receive Connector

Running Multiple NGINX Ingress Controllers in AKS