Find The Resources Which Use Particular User Assigned Managed Identity


I have been busy lately (answering on Q&A, Bicep testing, working, etc.) which prevented me from writing new blog posts but I hope to do more blogging again. This blog post will be a quick tip.

If you have wondered in which resources a particular user assigned managed identity was used you can see that information quickly by using Azure Resource Graph. The query is very simple:

resources
| where identity contains "userAssignedIdentities/<managed identity name>"

As managed identities can be used on policies as well it might worth checking if it is used there as well with:

policyresources
| where type =~ 'microsoft.authorization/policyassignments'
| where identity contains "userAssignedIdentities/<managed identity name>"

I hope this quick tip will be useful for you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.