Administrator

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.

  1. Open Windows PowerShell or PowerShell (no Elevated Permissions are needed)

    1. Make sure to use 64-bit version of PowerShell
  2. Run the following PowerShell command to login to Microsoft Teams

    Copy
    PowerShell
    Connect-MicrosoftTeams
  3. Login with a Microsoft User Account that has either one of these permissions

    1. Global Administrator;
    2. Teams Administrator; or
    3. 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

  4. Run the following PowerShell command to list the Voice Routing Policies

    Copy
    PowerShell
    Get-CsOnlineVoiceRoutingPolicy
  5. Run the following PowerShell command to assign a phone number to the resource account

    1. Provide the correct identity (username@domain.com)
    2. Provide the correct Online Voice Routing Policyy (voice-routing-policy)
    Copy
    PowerShell
    Grant-CsOnlineVoiceRoutingPolicy -Identity 'user@domain.com' -PolicyName 'voice-routing-policy'
  6. 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.

    Copy
    PowerShell
    Get-CsOnlineUser -identity 'user@domain.com' | select UserPrincipalName,OnlineVoiceRoutingPolicy

Environment

minute to read