turbot/azure_insights

Query: target_activedirectory_groups_for_activedirectory_group

Usage

powerpipe query azure_insights.query.target_activedirectory_groups_for_activedirectory_group

Steampipe Tables

SQL

with group_details as(
select
id as id,
title as title,
tenant_id as tenant_id,
jsonb_array_elements_text(member_ids) as m_id
from
azuread_group
)
select
g.id || '/' || g.tenant_id as activedirectory_group_id
from
group_details as ag
left join azuread_group as g on ag.m_id = g.id
where
g.id is not null
and ag.id = split_part($1, '/', 1)
and ag.tenant_id = split_part($1, '/', 2);