Document Conditional Access policies in Excel
This PowerShell script adapts functionality from the Modern Workplace Concierge and documents your Conditional Access Policies. The script exports all the data as a csv file which can be pretty formatted as excel workbook.
- Install this script from the PowerShell gallery (dependent modules are automatically installed):
| 1 | Install-Script -Name Invoke-ConditionalAccessDocumentation -Scope CurrentUser | 
Script is saved to the user’s default script lcoation: “C:\Users\%USERNAME%\Documents\WindowsPowerShell\Scripts”
- Connect to Microsoft Graph
| 1 | Grant initial consent: Connect-Graph -Scopes @("Application.Read.All", "Group.Read.All", "Policy.Read.All", "RoleManagement.Read.Directory", "User.Read.All") -ContextScope Process | 
Afterwards:
| 1 | Connect-Graph | 
- Run script via PowerShell dot sourcing
| 1 | & "C:\Users\$env:USERNAME\Documents\WindowsPowerShell\Scripts\Invoke-ConditionalAccessDocumentation.ps1" | 
- Pretty format the csv with excel & save it as excel workbook

Excel gimmicks
The following steps might help you to format the documentation.
- Copy the CSV data to the clipboard
- Create a new excel workbook
- Right click & paste the csv data with the transpose option
- Expand the rows and columns and ensure text wrap is turned on

