Forum Discussion
Phil123
Apr 19, 2022Brass Contributor
Azure Policy - Find Ressources without Tags
Hello Community, it is possible to define a Policy to find Ressources without Tags? I would like to define this Policy to list all of Items at the "Compliance" Point at the Policy Tab. I hav...
BrooksV
May 07, 2022Copper Contributor
Phil123
You can use a ARG (Azure Resource Graph) Queries. Here are three different queries:
// To Find Subscription Missing Tags
resourcecontainers
| where type == "microsoft.resources/subscriptions"
and isnull(tags) or tostring(tags) == '[]'
// To Find Resource Groups Missing Tags
resourcecontainers
| where type == "microsoft.resources/subscriptions/resourcegroups"
and isnull(tags) or tostring(tags) == '[]'
// To Find Resources Missing Tags
resources
| where isnull(tags) or tostring(tags) == '[]'