Skip to main content

Add/Assign/Remove Additional Phone Number/s

You have completed the initial configuration and now want to make adjustments to the Teams Phone System.

Prior to this, you have added/removed the "Microsoft Teams" option in the customer or partner portal for the desired phone number and added/removed the Microsoft license for telephony to the Teams user.

1. Preparation

1.1 Install/update "Microsoft Teams" module

  • Open PowerShell as administrator.
  • Install or update the Microsoft Teams module with the following command:
Set-ExecutionPolicy RemoteSigned -Force
Install-Module MicrosoftTeams -RequiredVersion 7.6.0 -AllowClobber
  • Finish PowerShell after installing the module.
info

You can skip this step if your module is up to date.

2. Start session

  • Reopen PowerShell (PowerShell as administrator does not need)
  • Import the Team PowerShell module
Import-Module MicrosoftTeams
  • To start working with the Microsoft Teams PowerShell module, type the following command:
Connect-MicrosoftTeams
  • The following is a pop-up for Microsoft 365 authentication. Your user must be assigned the Microsoft role "Global Administrator" or "Team Administrator".

3. Add/remove additional phone number/s

Choose whether you want to add or remove sipcall phone numbers from the Teams Phone System:

3.1a Assign phone number

Assign the desired sipcall number to any existing Microsoft 365 user or team resources account with the following command:

Set-CsPhoneNumberAssignment -identity "yourusername@yourcompany.com" -PhoneNumber "+<sipcallPhoneNumber>" -PhoneNumberType DirectRouting
Example with 3 users and a "Team Resources Account" (for team telephone auto attendant):
Set-CsPhoneNumberAssignment -identity "homer.simpson@thesimpsons.com" -PhoneNumber "+41441234001" -PhoneNumberType DirectRouting
Set-CsPhoneNumberAssignment -identity "marge.simpson@thesimpsons.com" -PhoneNumber "+41441234002" -PhoneNumberType DirectRouting
Set-CsPhoneNumberAssignment -identity "bart.simpson@thesimpsons.com" -PhoneNumber "+41441234003" -PhoneNumberType DirectRouting
Set-CsPhoneNumberAssignment -identity "mainnumber@thesimpsons.com" -PhoneNumber "+41441234000" -PhoneNumberType DirectRouting

3.2a Assign policy

You can assign the policy individually or for several users as a batch:

Grant a user permission for the policy:

Grant-CsOnlineVoiceRoutingPolicy -Identity "yourusername@yourcompany.com" -PolicyName "sipcall"
Example:
Grant-CsOnlineVoiceRoutingPolicy -Identity "homer.simpson@thesimpsons.com" -PolicyName "sipcall"
Grant-CsOnlineVoiceRoutingPolicy -Identity "marge.simpson@thesimpsons.com" -PolicyName "sipcall"
Grant-CsOnlineVoiceRoutingPolicy -Identity "bart.simpson@thesimpsons.com" -PolicyName "sipcall"
Grant-CsOnlineVoiceRoutingPolicy -Identity "mainnumber@thesimpsons.com" -PolicyName "sipcall"

4. Check configuration

Afterward, test according to the article Check configuration.

5. End PowerShell session

End the PowerShell session:

Disconnect-MicrosoftTeams
note

Allow Microsoft some time after completing the configuration. It may take up to 1 hour for the configuration to take full effect.