Forum Discussion
JFM_12
Apr 02, 2026Iron Contributor
Get all AA/CQ with Resource Accounts
Hello Is it possible to have a script that pulls out all AA/CQ with resource accounts. I would like to pull it to find out which of the AA/CQ do not have resource account. If there is no resource ...
- Apr 07, 2026
Hello JFM_12,
The supported approach is to query AAs and CQs separately and then join them with resource accounts via application instance associations.At a high level, the process is:
- Use Get-CsAutoAttendant and Get-CsCallQueue to retrieve all AAs and CQs.
- Use Get-CsOnlineApplicationInstance to retrieve all resource accounts.
- For each AA and CQ, check whether a resource account is associated by matching the ConfigurationId using Get-CsOnlineApplicationInstanceAssociation.
- If no associated resource account is found, treat that entry as missing a resource account.
Microsoft documents that each Auto Attendant or Call Queue is expected to have a resource account, but the platform does allow misconfigured or orphaned objects to exist (for example, after deletions or failed provisioning), which is why this audit is useful.
As reference:
- Resource accounts are required and managed separately:
https://learn.microsoft.com/en-us/microsoftteams/manage-resource-accounts - Associations between resource accounts and AAs/CQs are handled via Online Application Instance associations:
https://learn.microsoft.com/en-us/powershell/module/skype/new-csonlineapplicationinstanceassociation
If you want to avoid writing custom logic from scratch, community tools such as TeamsAACQTools already implement this correlation logic and can export AA/CQ configurations alongside their resource accounts:
- https://github.com/ashhw/TeamsAACQTools
Sayali-MSFT
Microsoft
Apr 03, 2026Hello JFM_12,
To identify Auto Attendants (AA) and Call Queues (CQ) that do not have Resource Accounts assigned, you must correlate voice apps, resource accounts, and their associations using Microsoft Teams PowerShell. This involves retrieving all Auto Attendants, Call Queues, and Resource Accounts, mapping them using Get-CsOnlineApplicationInstanceAssociation, and exporting the results to identify any missing assignments. Since neither Microsoft Graph nor the Teams Admin Center currently provides this relationship in bulk, PowerShell remains the only supported method for performing this type of tenant-wide audit.
You must use:
Get-CsOnlineApplicationInstanceAssociation
Reference Document-
1. Manage resource accounts for service numbers - Microsoft Teams | Microsoft Learn
2. PowerShell cmdlet reference for Auto attendants and Call queues - Microsoft Teams | Microsoft Learn
3. Get-CsOnlineApplicationInstanceAssociation (MicrosoftTeams) | Microsoft Learn
4. Get-CsAutoAttendant (MicrosoftTeams) | Microsoft Learn