---
title: "Initiate Oauth"
method: POST
path: "/api/identity/connections/{team_key}/m365/initiate"
tags: ["identity"]
---

# Initiate Oauth

`POST /api/identity/connections/{team_key}/m365/initiate`

## Request

- Base URL: `https://api.superit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.superit.ai/api/identity/connections/{team_key}/m365/initiate`
- Auth: HTTP bearer

Initiate M365 OAuth admin consent flow.

## Path parameters

- `team_key` string, required

## Request body

- M365OAuthInitiateRequest: Request to initiate M365 OAuth flow.
  - `display_name` string, nullable

## Response `200`

Successful Response

- M365OAuthInitiateResponse: Response with OAuth redirect URL and state.
  - `redirect_url` string, required
  - `state` string, required

## Other responses

- `400`: M365 integration not configured
- `401`: Not authenticated
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `409`: Conflict
- `422`: Validation Error

---

[API](https://skmtc.dev/superit/apis/super-it-api.md) - [All operations](https://skmtc.dev/superit/apis/super-it-api/llms.txt) - [OpenAPI document](https://skmtc.dev/superit/apis/super-it-api/revisions/4944d556c2bb?raw)
