Forum Discussion
Get all AA/CQ with Resource Accounts
- 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
Hello Sayali-MSFT
Thank you very much for your answer.
Do you have a script that would manage it?
Regards
Juan
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-MSFTApr 07, 2026
Microsoft
Hello JFM_12,
Your feedback is important to us. Please rate us:
🤩 Excellent 🙂 Good 😐 Average 🙁 Needs Improvement 😠 Poor