Curated Examples
Create a conditional access report
Use GraphEssentials to generate an HTML conditional access report.
This pattern is useful when conditional access rules need a readable review artifact.
It is adapted from Examples/ShowConditionalAccess.ps1.
Example
Import-Module GraphEssentials
Connect-MgGraph -Scopes 'Policy.Read.All', 'Agreement.Read.All', 'Directory.Read.All'
$reportPath = Join-Path $PSScriptRoot 'Reports\ConditionalAccess.html'
New-Item -ItemType Directory -Path (Split-Path $reportPath) -Force | Out-Null
Show-MyConditionalAccess -FilePath $reportPath -Online -ShowHTML -Verbose
What this demonstrates
- requesting scopes that match conditional access reporting
- writing the report to a script-local folder
- producing an HTML artifact for review