turbot/steampipe-mod-azure-insights

Dashboard: Azure Active Directory User Dashboard

This dashboard answers the following questions:

  • How many users are in each tenant?
  • How many external guest users are there?
  • How many deprecated users have owner role assigned?
  • How many users are assigned with custom roles?
This dashboard contains 5 cards.

Usage

Install the mod:

mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-azure-insights

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select Azure Active Directory User Dashboard dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run azure_insights.dashboard.activedirectory_user_dashboard --share

Queries

This dashboard uses the the following queries:
select
count(distinct
u.display_name) as value,
'Deprecated Users With Owner Role' as label,
case when count(*) = 0 then 'ok' else 'alert' end as type
from
azuread_user as u
left join azure_role_assignment as a on a.principal_id = u.id
left join azure_role_definition as d on d.id = a.role_definition_id
where d.role_name = 'Owner' and not u.account_enabled;

Tags