turbot/steampipe-mod-microsoft365-compliance

Query: azuread_device_join_restricted

Usage

powerpipe query microsoft365_compliance.query.azuread_device_join_restricted

SQL

select
tenant_id || '/' || id as resource,
case
when azure_ad_join -> 'allowedToJoin' ->> '@odata.type' = '#microsoft.graph.enumeratedDeviceRegistrationMembership'
or azure_ad_join -> 'allowedToJoin' ->> '@odata.type' = '#microsoft.graph.noDeviceRegistrationMembership' then 'ok'
else 'alarm'
end as status,
case
when azure_ad_join -> 'allowedToJoin' ->> '@odata.type' = '#microsoft.graph.enumeratedDeviceRegistrationMembership' then tenant_id || ' has device join restricted to selected users or groups.'
when azure_ad_join -> 'allowedToJoin' ->> '@odata.type' = '#microsoft.graph.noDeviceRegistrationMembership' then tenant_id || ' has device join restricted.'
else tenant_id || ' has device join allowed for all users.'
end as reason
, tenant_id as tenant_id
from
azuread_device_registration_policy;

Controls

The query is being used by the following controls: