Skip to main content

Remove Microsoft Teams Option

1. Disable the Microsoft Teams Option

First, check in the sipcall customer or partner portal whether the Microsoft Teams option has already been canceled/disabled.

2. Delete sipcall Direct Routing from your Microsoft Tenant

2.1 Preparation

2.1.1 Install/Update Microsoft Teams Module

info

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

  • Open PowerShell as administrator.

  • Install or update the Microsoft Teams module with the following command:

Set-ExecutionPolicy RemoteSigned -Force
Install-Module MicrosoftTeams -RequiredVersion 7.1.0 -AllowClobber
  • Finish PowerShell after installing the module.

2.2 Remove Configuration

2.2.1 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".

2.2.2 Remove User Phone Numbers

Disable the telephony features for the desired users and remove the phone number using the following command:

Remove-CsPhoneNumberAssignment -Identity "yourusername@yourcompany.com" -RemoveAll 
Example:
   Remove-CsPhoneNumberAssignment -Identity "homer.simpson@thesimpsons.ch" -RemoveAll 
Remove-CsPhoneNumberAssignment -Identity "marge.simpson@thesimpsons.ch" -RemoveAll
Remove-CsPhoneNumberAssignment -Identity "bart.simpson@thesimpsons.ch" -RemoveAll
Remove-CsPhoneNumberAssignment -Identity "hauptnummer@thesimpsons.ch" -RemoveAll
note

Wait at least 10 minutes before proceeding to the next step.

2.2.3 Remove the Voice Route

info

All phone numbers must first be removed from the sipcall voice route.

Remove the voice route:

Remove-CsOnlineVoiceRoute -Identity "sipcall"
note

Wait at least 10 minutes before proceeding to the next step.

2.2.4 Remove PstnUsage

Set-CsOnlinePstnUsage -Identity Global -Usage @{remove="sipcall"}

2.2.5 End PowerShell Session

End the PowerShell session:

Disconnect-MicrosoftTeams