# sipgate and MS Teams - set up telephony for a user in the Office tenant

Telephony for a user in MS Teams can be set up in two ways:

{% tabs %}
{% tab title="PowerShell" %}
**Using PowerShell and the Microsoft Teams module**

With the following command, you can connect to the Office tenant; authentication takes place in a separate window:

```powershell
Connect-MicrosoftTeams
```

In the next step, carry out the authentication once for each user: adjust the email address, phone number and, if applicable, the "PolicyName" as well.

```powershell
Set-CsPhoneNumberAssignment -Identity UserMail@YourDomain.xy -PhoneNumber +49xx -PhoneNumberType DirectRouting
Grant-CsOnlineVoiceRoutingPolicy -Identity "UserMail@YourDomain.xy" -PolicyName "sipgate"
```

You can find more about PowerShell with the Microsoft Teams module [at this link](https://learn.microsoft.com/de-de/microsoftteams/teams-powershell-install).
{% endtab %}

{% tab title="GUI (without PowerShell)" %}
**In the GUI, without PowerShell**

**Assign phone number**

Open the Microsoft Teams Admin Center, select under **Users** the item **User management** and then select the desired user.

![sipgate-help-center-MSTeams1.png](/files/2663ebf933c550516ca973b685a04378037054a5)

In the next step, select the item **Edit** .

![sipgate-help-center-MSTeams2.png](/files/965f2d07280666d307e19b04c883ccdd640798ed)

A sidebar then appears on the right in the window, where you should fill in the following fields:

**Phone number type:** Direct Routing

**Assigned phone number:** Phone number of the user in E.164 format, i.e. with international dialing code without a leading + or 0 digits (example: 4921110000)

Complete the entry by clicking **Apply** .

![sipgate-help-center-MSTeams3.png](/files/cc1b29e85ce6eca264adfeadd6034a507d3def03)

**Assign policy**

In the next step, you should assign the telephone policy to the users. To do this, switch to the **Policies** tab for the users and select there **Edit** .

![sipgate-help-center-MSTeams4.png](/files/7dcae6597bcd01e8d0c6b93e102cc10f744d426c)

A sidebar now appears in which you should select the **VoIP routing policy** for sipgate.

![sipgate-help-center-MSTeams5.png](/files/56aed6cf834aebddf33fb24df04364d8e462b1c9)
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Depending on the response time of the MS platform, implementation may work immediately or take a few hours.
{% endhint %}

You can get more information either on our [website](https://www.sipgate.de/funktionen/integrationen/microsoft-teams-integration) or in a non-binding consultation. Please contact us via our [contact form](https://www.sipgate.de/microsoft-teams-beratung-anfordern).


---

# 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/sipgate-und-ms-teams-telefonie-fuer-einen-user-im-office-tenant-einrichten.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.
