# Troubleshoot Microsoft Teams

> Fix common PowerShell errors and calls that don't reach Microsoft Teams with direct routing.

- URL: https://kb.voipcloud.online/teams-and-sip/microsoft-teams/troubleshoot-teams/
- Section: Microsoft Teams and SIP trunking › Microsoft Teams
- Type: troubleshooting
- Applies to: All countries
- Last reviewed: 2026-11-09

Find your symptom or error message below. Most problems come from the Microsoft 365 domain, the user's licence, or the phone number format.

## "Can not use the domain as it was not configured for this tenant"

**When:** running `New-CsOnlinePSTNGateway`.

**Cause:** the PBX domain (your **Microsoft 365 FQDN address**) isn't active in Microsoft 365 yet.

**Fix:**

1. Check that you created a new user with an address on the PBX domain, and gave it a licence that includes Teams. An alias on an existing user doesn't count. See [step 5 of the setup guide](https://kb.voipcloud.online/teams-and-sip/microsoft-teams/set-up-direct-routing/#5-activate-the-domain-with-a-licensed-user).
2. If you did, wait. Microsoft can take some time to activate a domain. Then run the command again.

## "The term 'Connect-MicrosoftTeams' is not recognized"

**Cause:** the Teams PowerShell module isn't installed or isn't allowed to run.

**Fix:**

1. Install the current module with `Install-Module -Name MicrosoftTeams`, or update an older one with `Update-Module -Name MicrosoftTeams`.
2. Allow scripts to run with `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned`.
3. Close PowerShell, open it again with **Run as administrator**, and run `Connect-MicrosoftTeams`.

Run `Get-Module` to see whether the MicrosoftTeams module is loaded. Use Windows PowerShell 5.1; Teams PowerShell has known issues with PowerShell 7.

## "Lacks appropriate licenses to assign a 'DirectRouting' number" or "Cannot modify the parameter: EnterpriseVoiceEnabled"

**When:** running `Set-CsPhoneNumberAssignment` or other user commands. The second message mentions a service plan such as `MCOProfessional`.

**Cause:** the user doesn't have the right Microsoft licence.

**Fix:**

1. In the Microsoft 365 admin centre, check the user has a licence that includes Teams plus the **Teams Phone Standard** add-on. See [step 1 of the setup guide](https://kb.voipcloud.online/teams-and-sip/microsoft-teams/set-up-direct-routing/#1-give-your-teams-users-the-right-licence).
2. If the licences look right, remove them from the user, wait 20 to 30 minutes, assign them again, and run the command again.

## "Is not a user policy"

**When:** running `Grant-CsOnlineVoiceRoutingPolicy`.

**Cause:** the voice routing policy in your tenant has a different name.

**Fix:** run `Get-CsOnlineVoiceRoutingPolicy` to see the name, and use it in `-PolicyName`.

## Calls don't ring in Teams

**Likely causes and fixes:**

- **The phone number is in the wrong format.** It must be in international format, as the portal shows it: `61XXXXXXXXX`, not `0XXXXXXXXX`. Check what Microsoft has with `Get-CsOnlineUser -Identity "<email address>"` and look at **LineURI**. To fix it, run `Set-CsPhoneNumberAssignment` again with the right number.
- **The account isn't connected in the PBX, or the configuration isn't applied.** Check the account is on a User or SIP trunk and click **Apply configuration**. See [Connect Teams users in the PBX](https://kb.voipcloud.online/teams-and-sip/microsoft-teams/connect-teams-users-in-the-pbx/).
- **The number is used in your call flow.** When a Teams number is in an [Inbound number](https://kb.voipcloud.online/pbx/receive-calls/inbound-number/), the call flow decides where it goes, not the static route. Check the call flow sends it to the user or trunk with the Teams account.
- **Teams voicemail answers first.** [Turn off Teams voicemail](https://kb.voipcloud.online/teams-and-sip/microsoft-teams/turn-off-teams-voicemail/).

## No dial pad in Teams

- Restart the Teams app.
- Microsoft can take up to 48 hours to set up a new user. Wait, then check again.
- Check the user has the phone licence, a phone number (`Set-CsPhoneNumberAssignment`) and the voice routing policy (`Grant-CsOnlineVoiceRoutingPolicy`).

## The gateway shows as inactive in the Teams admin centre

This is expected with this setup and doesn't mean anything is wrong. Check calls instead.

## Calls to a parking slot don't work

Blind transfers from Teams to a [Call parking](https://kb.voipcloud.online/pbx/mass-incoming-calls/call-parking/) slot don't work as expected. This is a known limitation.

## Useful PowerShell commands

Run `Connect-MicrosoftTeams` first. Replace `<email address>` with the user's Teams email.

| Command | Shows |
| --- | --- |
| `Get-InstalledModule` | Installed modules and versions, including MicrosoftTeams. |
| `Get-Module` | Modules loaded in this session. |
| `Get-CsOnlineUser -Identity "<email address>" \| fl UserPrincipalName` | Whether Microsoft can find the user. |
| `Get-CsOnlineUser -Identity "<email address>" \| fl EnterpriseVoiceEnabled` | Whether the user has voice enabled. |
| `Get-CsTenantDialPlan` | The dial plans in your tenant. |
| `Get-CsOnlinePSTNGateway` | The PSTN gateways and their settings. |
| `Get-CsOnlinePstnUsage` | The global PSTN usages. |
| `Get-CsOnlineVoiceRoute` | The voice routes and their gateways. |
| `Get-CsOnlineVoiceRoutingPolicy` | The voice routing policies. |

## When to contact support

If calls still don't reach Teams after these checks, raise a [support ticket](https://kb.voipcloud.online/support/support-tickets/). Include the Teams user's email address, the phone number, and the exact error message or the time of a failed test call.
