Microsoft Tech Community Live:  Microsoft Teams Edition
November 09, 2021, 08:00 AM - 12:00 PM (PST)

Assign Resource Account to CallQueue or AutoAttendant (Powershell)

%3CLINGO-SUB%20id%3D%22lingo-sub-1806927%22%20slang%3D%22en-US%22%3EAssign%20Resource%20Account%20to%20CallQueue%20or%20AutoAttendant%20(Powershell)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1806927%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20have%20created%20a%20provisioning%20Script%20for%20the%20creation%20of%20the%20resource%20accounts%20%2F%20callqueue%20%2F%20autoattendant%20but%20the%20final%20steps%207%26amp%3B8%20(assign%20resource%20account)%20is%20missing.%20I%20have%20found%20informations%20how%20to%20assign%20them%20in%20teams%20admin%20center%20(GUI)%20but%20not%20via%20powershell.%20Does%20someone%20know%20how%20to%20assign%20the%20RA%20to%20the%20CQ%20or%20a%20AA%20via%20powershell%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScripting%20Plan%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3COL%3E%3CLI%3ECreate%20Resource%20Accounts%20(CallQueue%20%2F%20AutoAttendant)%3C%2FLI%3E%3CLI%3ESet%20Usage%20Location%20to%20Resource%20Accounts%3C%2FLI%3E%3CLI%3EAssign%20PhoneSystem%20Virtual%20User%20License%20to%20Resource%20Accounts%3C%2FLI%3E%3CLI%3EAssign%20TelephoneNumber%20to%26nbsp%3BResource%20Account%20(AutoAttendant)%3C%2FLI%3E%3CLI%3ECreate%20CallQueue%3C%2FLI%3E%3CLI%3ECreate%20AutoAttendant%20(Redirect%20Call%20to%20Call%20Queue)%3C%2FLI%3E%3CLI%3EAssign%20Resource%20Account%20(Call%20Queue)%20to%20Call%20Queue%3C%2FLI%3E%3CLI%3EAssign%20Resource%20Account%20(AutoAttendant)%20to%20AutoAttendant%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1806927%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdministrator%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECommunity%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHow-to%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1993798%22%20slang%3D%22en-US%22%3ERe%3A%20Assign%20Resource%20Account%20to%20CallQueue%20or%20AutoAttendant%20(Powershell)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1993798%22%20slang%3D%22en-US%22%3E%3CP%3ENo%20Not%20Yet%20.%20ressource%20account%20creation%20is%20a%20nightmare%20!!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2118065%22%20slang%3D%22en-US%22%3ERe%3A%20Assign%20Resource%20Account%20to%20CallQueue%20or%20AutoAttendant%20(Powershell)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2118065%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F422851%22%20target%3D%22_blank%22%3E%40kai_wessels%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20not%20sure%20the%20previous%20response%20to%20this%20is%20valid.%26nbsp%3B%20The%20commands%20you're%20looking%20for%20are%20*-CsOnlineApplicationInstanceAssociation.%20Based%20on%20documentation%2C%20the%20command%20New-CsOnlineApplicationInstanceAssociation%20has%20been%20around%20since%20at%20least%20December%202018.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBasic%20usage%20would%20look%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E%24ResourceAccountId%20%3D%20(Get-CsOnlineUser%20%22autoattendant%40example.com%22).ObjectId%0A%24AutoAttendant%20%3D%20(Get-CsAutoAttendant%20-NameFilter%20%22Main%20Auto%20Attendant%22).Identity%0A%0ANew-CsOnlineApplicationInstanceAssociation%20-Identities%20%40(%24ResourceAccountId)%20-ConfigurationId%20%24AutoAttendant%20-ConfigurationType%20AutoAttendant%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESame%20for%20Call%20Queues%20except%20using%20Get-CsCallQueue%20and%20changing%20the%20ConfigurationType%20to%20CallQueue.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Visitor

Hi Everyone,

 

i have created a provisioning Script for the creation of the resource accounts / callqueue / autoattendant but the final steps 7&8 (assign resource account) is missing. I have found informations how to assign them in teams admin center (GUI) but not via powershell. Does someone know how to assign the RA to the CQ or a AA via powershell ?

 

Scripting Plan:

  1. Create Resource Accounts (CallQueue / AutoAttendant)
  2. Set Usage Location to Resource Accounts
  3. Assign PhoneSystem Virtual User License to Resource Accounts
  4. Assign TelephoneNumber to Resource Account (AutoAttendant)
  5. Create CallQueue
  6. Create AutoAttendant (Redirect Call to Call Queue)
  7. Assign Resource Account (Call Queue) to Call Queue
  8. Assign Resource Account (AutoAttendant) to AutoAttendant
3 Replies

No Not Yet . ressource account creation is a nightmare !!!

@kai_wessels 

 

I'm not sure the previous response to this is valid.  The commands you're looking for are *-CsOnlineApplicationInstanceAssociation. Based on documentation, the command New-CsOnlineApplicationInstanceAssociation has been around since at least December 2018.

 

Basic usage would look like this:

 

$ResourceAccountId = (Get-CsOnlineUser "autoattendant@example.com").ObjectId
$AutoAttendant = (Get-CsAutoAttendant -NameFilter "Main Auto Attendant").Identity

New-CsOnlineApplicationInstanceAssociation -Identities @($ResourceAccountId) -ConfigurationId $AutoAttendant -ConfigurationType AutoAttendant

 

Same for Call Queues except using Get-CsCallQueue and changing the ConfigurationType to CallQueue.

Worked great. I'm used to using the GUI but this is a much faster method and used when Microsoft was rolling back an update.