← Guides & References

Microsoft Teams

Teams Calling Bot Installation

Connect your Microsoft 365 tenant to the VoIP Toolbox Teams calling bot by granting consent, creating a Teams application instance (resource account) linked to our bot, and licensing it for voice.

Your progress

Sign in to save your tenant ID and track each step for your account.

Log In

Who does this? A Global Administrator in the customer Microsoft 365 tenant. You need the tenant's Azure AD tenant ID (GUID) from Microsoft Entra ID → Overview.

B

Create a Teams application instance

Register a resource account in your tenant that is bound to the VoIP Toolbox bot application ID. The UPN must use a verified Microsoft 365 / Teams domain (for example voiptoolbox-bot@contoso.onmicrosoft.com).

  1. Install the Microsoft Teams PowerShell module if needed.
  2. Connect as a Teams administrator: Connect-MicrosoftTeams
  3. Run New-CsOnlineApplicationInstance with your bot's application ID (29c7300e-925f-4ba0-87ae-f0f4c7a13f70).
New-CsOnlineApplicationInstance -UserPrincipalName voiptoolbox-calling-bot@yourtenant.onmicrosoft.com -ApplicationId 29c7300e-925f-4ba0-87ae-f0f4c7a13f70 -DisplayName "VoIP Toolbox Teams Calling Bot"

After creating the instance, look up its Object ID (required for outbound PSTN calls via Graph):

Get-CsOnlineApplicationInstance -Identity voiptoolbox-calling-bot@yourtenant.onmicrosoft.com | Select-Object ObjectId, ApplicationId, PhoneNumber, UserPrincipalName

Microsoft reference: New-CsOnlineApplicationInstance, Phone numbers for bots (Graph).

C

License the resource account

Assign a Teams Phone Resource Account (virtual user) license to the application instance in the Microsoft 365 admin center.

  1. Open the Microsoft 365 admin center.
  2. Go to BillingLicenses, or UsersActive users and find the application instance
  3. Assign Microsoft Teams Phone Resource Account (and a Calling Plan license if you will assign a service phone number in the next step).

See Teams Phone resource account licensing.

D

Optional: phone number and voice in Teams Admin Center

To receive PSTN calls on the bot, assign a service phone number to the resource account and ensure voice is enabled. Skip this step if you only need Teams-to-Teams tests without a number.

  1. Open the Teams admin center.
  2. Go to VoicePhone numbers and acquire or assign a number to the resource account (Calling Plan, Direct Routing, or Operator Connect).
  3. Under VoiceResource accounts, confirm the account is voice-enabled and shows the assigned number.
  4. Place a test call to that number and confirm VoIP Toolbox handles the call as expected.
E

Enable outbound calls via Direct Routing

To let the bot place outbound PSTN calls through VoIP Toolbox Direct Routing, create a PSTN usage for your voice route domain, assign a voice routing policy to the bot, and optionally assign a test phone number.

Prerequisite: Complete Teams Direct Routing Setup first, through step 4 (domain verified and your derived trunk example-123.probeXX.voiptoolbox.net added to a voice route). Also complete steps A–C above for this bot.

  1. Connect as a Teams administrator: Connect-MicrosoftTeams
  2. Add a PSTN usage named after your Direct Routing domain. This links your voice route to the bot's outbound policy:
Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="example-123.probeXX.voiptoolbox.net"}
  1. Edit the voice route from Direct Routing setup step 4 and add PSTN usage example-123.probeXX.voiptoolbox.net. In the Teams Admin Center, open VoiceDirect RoutingVoice routes, select your route, and add the PSTN usage under PSTN usage records.
  2. Create a voice routing policy that includes the same PSTN usage:
New-CsOnlineVoiceRoutingPolicy "VoIP Toolbox Bot Outbound" -OnlinePstnUsages "example-123.probeXX.voiptoolbox.net"
  1. Grant the voice routing policy to your bot application instance (use the UPN you saved in step B):
Grant-CsOnlineVoiceRoutingPolicy -Identity voiptoolbox-calling-bot@yourtenant.onmicrosoft.com -PolicyName "VoIP Toolbox Bot Outbound"
  1. Recommended: assign a Direct Routing phone number to the bot for outbound caller ID. With Direct Routing you can use any number for this type of testing, for example +11000010000:
Set-CsPhoneNumberAssignment -Identity voiptoolbox-calling-bot@yourtenant.onmicrosoft.com -PhoneNumber +11000010000 -PhoneNumberType DirectRouting

Microsoft reference: Configure call routing for Direct Routing, Set-CsPhoneNumberAssignment.