Uses PowerShell to read configurations of Microsoft Teams Auto Attendants, Call Queues and User Settings and renders them visually into a mermaid-js flowchart.
The changelog can be found here.
Please not that this script has only been tested on Windows systems. If you don't specify an identity or a name, Out-GridView
is used which, to my knowledge is limited to Windows. Furthermore, I'm not sure how file operation and file paths behave on other, Non-Windows operating systems.
The following PowerShell Modules are required:
Module | Required Version | Last Tested Version |
---|---|---|
MicrosoftTeams | 4.9.3 | 4.9.3 |
Microsoft.Graph.Users | n/a | 1.9.6 |
Microsoft.Graph.Groups | n/a | 1.9.6 |
If you want to make use of the PNG export feature, you also need the following components.
- Node.JS
- @mermaid-js/mermaid-cli npm package
Please see here how to install them.
Run these two commands in an elevated PowerShell window to install the modules from the PSGallery.
Install-Module Microsoft.Graph
Install-Module MicrosoftTeams
Run this in PowerShell.
winget install --id=OpenJS.NodeJS -e
Restart PowerShell after installing Node.JS.
npm install -g @mermaid-js/mermaid-cli
Verify that mermaid-cli is installed by running mmdc --version
in PowerShell.
Please see this site for more information.
Please see the parameter description directly inline in the script.
.\M365CallFlowVisualizerV2.ps1
This will run the script without any parameters / default parameters. You will be presented a list with available auto attendants and call queues.
.\M365CallFlowVisualizerV2.ps1 -Identity "6fb84b40-f045-45e8-8c1a-8fc18188exxx"
This will run the script for the voice app (auto attendant or call queue, not resource account) with the unique identity of "6fb84b40-f045-45e8-8c1a-8fc18188exxx"
.\M365CallFlowVisualizerV2.ps1 -VoiceAppName "PS Test AA" -VoiceAppType "Auto Attendant"
This will run the script for the auto attendant called "PS Test AA".
.\M365CallFlowVisualizerV2.ps1 -VoiceAppName "PS Test CQ" -VoiceAppType "Call Queue"
This will run the script for the call queue called "PS Test CQ".
.\M365CallFlowVisualizerV2.ps1 -CustomFilePath "C:\Temp"
This will run the script and save the output file to "C:\Temp".
.\M365CallFlowVisualizerV2.ps1 -VoiceAppName "PS Test AA" -VoiceAppType "Auto Attendant" -DisplayNestedCallFlows $false
This will run the script without expanding and rendering call flows of auto attendants or call queues which are nested behind "PS Test AA". Only the names and types of these voice apps will be displayed.
.\M365CallFlowVisualizerV2.ps1 -VoiceAppName "PS Test AA" -VoiceAppType "Auto Attendant" -Theme dark
This will run the script and set the Mermaid theme inside Markdown to dark theme.
The script supports outputting Mermaid-JS code in either a Markdown file (.md) or a Mermaid file (.mmd).
To preview Markdown files containing mermaid sections I suggest the following VS Code Extension
To preview Mermaid files I suggest the following VS Code Extension. You can also save an SVG or PNG image with this extension.
These are some examples generated from real configurations inside a Microsoft 365 Tenant. Everthing you see has been generated and rendered 100% automatically. With the new V2 Version it's theoretically possible to render nested voice apps and user calling settings indefinitely. Loops should also be reflected correctly, altough the diagram can look a little weird. The logic now detects if multiple voice apps forward to the same target and will render each voice app only one time.
You can also copy the contents of the output file and paste it here, if you want to manually edit the generated Mermaid flowchart. The live editor supports exporting flow charts as *.png or *.svg images.
You can find more information about Mermaid syntax here
If you want to implement Mermaid Diagrams into your markdown based documentation site, I suggest to take a look at DocFx.
- The tool has only been tested on Windows systems. Some functionalty might not be available on other platforms.
- Forwarding Targets in a holiday list are not expanded. --> Implemented in V 2.9.3
- IVRs in holiday call handlings are not supported. --> Implemented in V 2.9.3
- Reflect if voicemail transcription or suppress system greeting is on --> Suppress system message was implemented in V 2.4.2
- Display call queue and auto attendant language settings --> Call Queue language implemented in V 2.4.4
- Custom HEX color support for the mermaid diagram --> Implemented in V 2.3.0
- Migrate from MSOnline to Microsoft Graph PowerShell --> Implemented in V 2.4.0
These are planned changes. There is no ETA nor is it guaranteed that these features will ever be added.
This script is provided free of charge. Please do not sell it in any form. Please include my name, Twitter and GitHub handle/links if you plan to post about this tool online or offline. Thank you.