# How do I set up the sipgate MS Teams integration?

The sipgate MS Teams integration for your account is activated manually. Simply write an email to <support-ms-teams@sipgate.de>.

If you use sipgate trunking, it is sufficient to include the account number in the email for which the integration should be booked.

{% hint style="warning" %}
Important: Please only activate numbers on the trunk that are also used in MS Teams, as each activation incurs costs.
{% endhint %}

For sipgate business, in addition to the account number, the users for whom the integration should be activated must also be specified.

#### **Requirements for the MS Teams integration** <a href="#h_01jf73fykasb215cry74e54kem" id="h_01jf73fykasb215cry74e54kem"></a>

* You use an Office 365 business or school account
* You have a business or trunking contract on sipgate.de (sipgate.co.uk is currently not supported)
* On your computer, the [PowerShell](https://learn.microsoft.com/de-de/powershell/scripting/install/installing-powershell?view=powershell-7.4) with the module [MicrosoftTeams](https://learn.microsoft.com/de-de/microsoftteams/teams-powershell-install) is installed
* You have access as "Global Administrator" to the Office tenant
* You have access as "Administrator" to the sipgate account
* All affected users in the Office tenant have the "Microsoft Teams Phone Standard" license
* In the [Upgrade settings for MS Teams](https://admin.teams.microsoft.com/one-policy/settings/teams-upgrade) the coexistence mode is set to "Teams Only"

{% stepper %}
{% step %}
**Set up domains in the Office tenant**

Open a browser with two tabs:

* Tab 1 with the "[Microsoft 365 admin center](https://admin.microsoft.com/Adminportal/Home?source=applauncher#/homepage)"
* Tab 2 with the [sipgate web app](https://app.sipgate.com/controlpanel) as administrator

Now open the tile **MS Teams** and click on **in the sipgate web app and perform the DNS challenge.** A widget will open in which you **Continue** choose.

Now copy the domain shown there to the clipboard using the copy icon.

Next, switch to the tab with the **365 admin center** and open the view **Settings ➔ Domains**.

Click there on the item " **Add domain** and on the new page paste the sipgate subdomain from the clipboard into the field **domain name** .

Now select the button at the bottom **Use this domain** to continue.

On the following page **Verify your domain ownership** select the option **Add a TXT record to the domain** and confirm this at the bottom using the button **Continue**.

Now on the new page, copy the TXT value to the clipboard using the copy icon and switch to the tab with the sipgate web app.

In the still open widget from the sipgate web app, click into the input field **TXT Record** and paste the TXT value from the clipboard, then confirm with "Next".

Now go back to the tab with the 365 admin center and click there on **Verify**. If this is not immediately successful, wait a few seconds and repeat the verification.

On the page that now follows with the question "How would you like to connect your domain?" please open the link **More options** and enable the option: **Skip and do this later (not recommended)**, then click Next.

On the page now displayed, you can complete the setup of this subdomain with **Done** .

Now go back to the tab with the sipgate web app and select in the still open widget **Continue** .

Repeat the process now for the second subdomain.

A video of the process is linked here: [Set up subdomains for VoIP gateway](https://www.loom.com/share/350b425829654817a87621980b6b2ebe?sid=9e466d03-e617-4356-92b1-96463bc4c9e7).
{% endstep %}

{% step %}
**Set up direct routing**

Open PowerShell as administrator and enter the following commands:

```powershell
# If the Microsoft Teams module is not yet installed in PowerShell
# please install it with the following command
Install-Module MicrosoftTeams

# If it is already installed, the current version can be checked with
Get-InstalledModule

# The module can be updated with the following command if it is outdated
Update-Module MicrosoftTeams

# If an installation or update has occurred, before the next command
# close PowerShell once and restart it

# Connect to the Office tenant with the following command,
# authentication takes place in a separate window
Connect-MicrosoftTeams
# For 2FA with Connect-MicrosoftTeams -use

# Only if there is no permission to run the CMDlet 'Connect-MicrosoftTeams',
# then run "Connect-MicrosoftTeams" again
Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="sipgate"}

# subdomain1 and subdomain2 are to be replaced by the previously created subdomains. This is one command, even if it is displayed here with a line break
New-CsOnlineVoiceRoute -Identity "sipgate" -NumberPattern ".*" -OnlinePstnGatewayList subdomain1, subdomain2 -Priority 1 -OnlinePstnUsages "sipgate"

New-CsOnlineVoiceRoutingPolicy "sipgate" -OnlinePstnUsages "sipgate"

# Only for sipgate business, NOT FOR TRUNKING
Set-CsTeamsCallingPolicy -Identity Global -MusicOnHoldEnabledType Disabled
```

{% endstep %}

{% step %}
**Set up telephony for users**

This is described in a separate article: [sipgate and MS Teams - set up telephony for a user in the Office tenant.](https://help.sipgate.de/hc/de/articles/17208220476701-sipgate-und-MS-Teams-Telefonie-f%C3%BCr-einen-User-im-Office-Tenant-einrichten)
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sipgate.de/cloud-telefonanlage/en/connections-and-integrations/ms-teams/wie-richte-ich-die-sipgate-ms-teams-integration-ein.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
