---
title: "login with Microsoft Identity Provider by Authorization Code Flow"
method: POST
path: "/login/by_microsoft"
tags: ["Authentication"]
---

# login with Microsoft Identity Provider by Authorization Code Flow

`POST /login/by_microsoft`

## Request

- Base URL: `https://HOSTNAME:8887/api`
- URL: `https://HOSTNAME:8887/api/login/by_microsoft`
- Auth: none required
- TypeScript: <https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/docs/login/by_microsoft/post.ts> (a function with typed inputs; its response is checked against the schema)

login with Microsoft Identity Provider by Authorization Code Flow.

## Request body `application/x-www-form-urlencoded`

- object
  - `domain` string, required: The SIP domain of tenant. It is usually a fully qualified domain name (FQDN). If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain. The SIP domain name is only used for SIP message authentication and does not require analysis.

## Other responses

- `302`: Found
- `4XX`: Error

---

[API](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api.md) - [All operations](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/revisions/577415d4a3d5?raw)
