I’d be lying if I said that many people have asked me about such a script. But one person has. Frankly, this was all the motivation I needed. The question was if there’s a way to see all call flows any user is associated with. I figured that I’d take a shot and see if I can come up with anything. And come up I did.
First, let’s talk about where a Teams User could be configured in a call flow.
- Auto Attendant Holiday Call Handlings
- Auto Attendant Default Call Flows (transfer or IVR option)
- Auto Attendant After Hours Call Flows (transfer or IVR option)
- Auto Attendant Operator (IVR option)
- Call Queue Agent
- Call Queue Timeout Target (transfer or personal voicemail)
- Call Queue Overflow Target (transfer or personal voicemail)
How Does it Work?
To achieve this, I’ve modified the M365 Call Flow Visualizer Script. Since the Visualizer is already able to read configurations from Auto Attendants and Call Queues, this wasn’t too hard. All I had to do was to write another function which will pull the Ids of all Voice Apps into an array. I then loop through all the Ids and run the Visualizer for each Voice App. When the Visualizer detects that a call is forwarded to a User at any point in the call flow, the details of said forwarding will be added to a PSObject which will then be added to a variable which only exists in the new function. I called this variable $userLinkVoiceApps
. Because the Visualizer is running for each Voice App, this variable must exist outside of the main script. Otherwise, it would get overwritten after each run.
. .\Functions\Find-CallQueueAndAutoAttendantUserLinks.ps1
. Find-CallQueueAndAutoAttendantUserLinks -SearchScope All
I’ve added this script to my repository. Make sure you clone the whole repo or download it as a zip file so that all relative file paths work.
If you don’t specify the -SearchUserId
you will be able to select a user from the Out-GridView Table. Otherwise, you can pass an Azure AD ObjectId to the function using this parameter. You can also limit the search scope to just AutoAttendants
or CallQueues
. By default, the search Scope All
is used.
The M365CallFlowVisualizer.ps1 is run with the parameters shown below. The -FindUserLinks
switch tells the script to write all user related information into the external $userLinkVoiceApps
variable. Since we’re running the script for each Voice App anyway, there’s no point in expanding nested call flows. We don’t need to create diagrams either, therefore all diagram output options are disabled.
. .\M365CallFlowVisualizerV2.ps1 -Identity $searchScopeIncludedVoiceApp -FindUserLinks -SaveToFile $false -SetClipBoard $false -ExportHtml $false -ShowNestedCallFlows $false -ShowUserCallingSettings $false
Depending on the amount of Voice Apps you have, it will take some time to finish. After all the information has been gathered, it will be exported to a CSV file at.\Output\VoiceAppsLinkedTo_$UserId.csv
.
Here’s an example of the generated output (the actual output will also include User Ids and Voice App Ids). We’re now able to see to which Voice Apps and where in these Voice Apps a user is configured at a glance.
Good to Know
The M365 Call Flow Visualizer does not support reading IVRs on Holiday Call Handlings. Thus, this script won’t be able to tell if a user is linked to an Auto Attendant on a Holiday IVR.
The Visualizer is built in a way in which it represents an accurate diagram of the active configuration of a Voice App. For example, if you’ve configured an Operator but it isn’t linked to an IVR menu option, the Operator won’t be drawn in the diagram, even if it’s present in the configuration. The same goes for configured after hours call flows, which don’t use a schedule (in which case the default call flow is active all the time). Because of that, the script won’t include users which are configured on inactive configurations on Auto Attendants.
For Call Queues which are configured to either immediately time out or overflow it’s a little bit different. The Visualizer won’t draw the call distribution subgraph because there’s no distribution happening when zero-time outs or overflows are configured but the agent will still be included in the exported CSV file.
Here we can see that the Call Queue “PS Test CQ” immediately overflows to an external number.
In Teams Admin Center, agents are assigned using a Team though.
If you would like to learn more about Call Queues and Agent Lists, please refer to this article.
Nevertheless, the CallFlowUserFinder.ps1 will still include this user in the exported table so that you can see all the Queues a user is associated with.
I hope that this script/method helps you figure which Voice Apps a specific user is linked to.