turbot/azure_insights

Query: activedirectory_user_by_tenant

Usage

powerpipe query azure_insights.query.activedirectory_user_by_tenant

SQL

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

Dashboards

The query is used in the dashboards: