turbot/steampipe-mod-microsoft365-compliance

Query: microsoft365_sharepoint_external_content_sharing_restricted

Usage

powerpipe query microsoft365_compliance.query.microsoft365_sharepoint_external_content_sharing_restricted

SQL

select
tenant_id as resource,
case
when sharepoint_settings ->> 'sharing_capability' = 'externalUserAndGuestSharing' then 'alarm'
else 'ok'
end as status,
case
when sharepoint_settings ->> 'sharing_capability' = 'externalUserAndGuestSharing' then title || ' microsoft365 external content sharing unrestricted.'
else title || ' external content sharing set to ' || (sharepoint_settings ->> 'sharing_capability') || '.'
end as reason
, tenant_id as tenant_id
from
microsoft365_organization;

Controls

The query is being used by the following controls: