Annex 5: Assign Online Voice Routing Policy using PowerShell
If it is impossible to assign a Online Voice Routing Policy via the Microsoft interface, after the resource account has been assigned to Infinity.
-
Open Windows PowerShell or PowerShell (no Elevated Permissions are needed)
- Make sure to use 64-bit version of PowerShell
-
Run the following PowerShell command to login to Microsoft Teams
-
Login with a Microsoft User Account that has either one of these permissions
- Global Administrator;
- Teams Administrator; or
- Teams Communications Administrator
To learn how to assign user roles with Azure Active Directory please visit:
Add an existing Azure subscription to your tenant | Microsoft Learn -
Run the following PowerShell command to list the Voice Routing Policies
-
Run the following PowerShell command to assign a phone number to the resource account
- Provide the correct identity (username@domain.com)
- Provide the correct Online Voice Routing Policyy (voice-routing-policy)
CopyPowerShellGrant-CsOnlineVoiceRoutingPolicy -Identity 'user@domain.com' -PolicyName 'voice-routing-policy'
-
Run the following PowerShell command to verify if the Online Voice Routing Policy is assigned successfully.
Please note
Replace username@domain.com with the actual username and domain you provided when creating the resource account.
CopyPowerShellGet-CsOnlineUser -identity 'user@domain.com' | select UserPrincipalName,OnlineVoiceRoutingPolicy