turbot/steampipe-mod-azure-insights

Dashboard: Azure Active Directory User Detail

This dashboard answers the following questions for each user:

  • How is the user configured?
  • What are the last five sign-in report of the user?
  • What roles and groups are associated with the user?
  • What relationships does the user have with other resources?
This dashboard contains 1 card, 1 graph, 1 input and 5 tables.

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 Detail dashboard.

You could also snapshot and share results via Turbot Pipes:

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

Queries

This dashboard uses the the following queries:
select
role_name as "Role Name",
id as "Role ID"
from
(
select
dr.display_name as role_name,
dr.id as id
from
azuread_directory_role as dr,
jsonb_array_elements(member_ids) as m
where
trim((m::text), '""') = split_part($1, '/', 1)
and dr.tenant_id = split_part($1, '/', 2)
union select
dr.display_name as role_name,
dr.id as id
from
azuread_directory_role as dr,
jsonb_array_elements(member_ids) as m
where
trim((m::text), '""') in (select
g.id as id
from
azuread_group as g,
jsonb_array_elements(member_ids) as m
where
trim((m::text), '""') = split_part($1, '/', 1)
and g.tenant_id = split_part($1, '/', 2))
) data
order by
role_name;

Tags