All scripts
Governance 692
Get-IntuneAppProtectionPolicyReport
Reports every app protection (MAM) policy and the apps it targets, useful for confirming personal devices without full MDM enrollment still have data protection applied.
Get-IntuneAppProtectionPolicyReport.ps1
<#
.SYNOPSIS
Reports app protection (MAM) policies and their targeted apps.
.DESCRIPTION
Lists every app protection policy for iOS and Android with the apps
it applies to, useful for confirming personal (BYOD) devices without
full MDM enrollment still have data protection controls in place.
.EXAMPLE
.\Get-IntuneAppProtectionPolicyReport.ps1
.NOTES
Requires Microsoft.Graph.DeviceManagement with an active
Connect-MgGraph session.
.AUTHOR
Shehryar Hassan
#>
$iosPolicies = Get-MgDeviceAppManagementIosManagedAppProtection -All
$androidPolicies = Get-MgDeviceAppManagementAndroidManagedAppProtection -All
$report = @()
$report += $iosPolicies | Select-Object DisplayName, @{N="Platform";E={"iOS"}}, PeriodOfflineBeforeAccessCheck
$report += $androidPolicies | Select-Object DisplayName, @{N="Platform";E={"Android"}}, PeriodOfflineBeforeAccessCheck
$report | Format-Table -AutoSize
Read it before you run it, and test in a safe tenant first.