turbot/azure_insights

Query: activedirectory_group_by_tenant

Usage

powerpipe query azure_insights.query.activedirectory_group_by_tenant

SQL

with tenants as (
select
distinct tenant_id,
title
from
azure_tenant
)
select
t.title as "Tenant",
count(g.*)
from
azuread_group as g,
tenants as t
where
g.tenant_id = t.tenant_id
group by
t.title
order by
count desc;

Dashboards

The query is used in the dashboards: