---
title: "Teams Install Url"
method: POST
path: "/v1/integrations/teams/install-url"
tags: ["integrations"]
---

# Teams Install Url

`POST /v1/integrations/teams/install-url`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/integrations/teams/install-url`
- Auth: HTTP bearer

Return an Azure AD admin-consent URL with an HMAC-signed, short-TTL state.

The tenant identity comes exclusively from the bearer token. Only a caller
with account-edit authority can attach the whole Teams workspace. Fails closed
(400) when Teams is not configured.

An optional ``return_path`` is narrowed to an exact destination allowlist during minting and
never 422s, so an unrecognised one cannot block the connect.

## Headers

- `X-Tenant-Id` string, nullable

## Request body

- TeamsInstallUrlRequest: Optional body for the install-URL mint: where to return after Microsoft's consent screen.
  - `return_path` string: App-relative dashboard path to return to after the Microsoft consent screen. Only an exact allowlisted destination is honoured; anything else lands on workspace settings.

## Response `200`

Successful Response

- TeamsInstallUrlResponse: The Microsoft admin-consent URL for this Patricia tenant.
  - `url` string, required: Microsoft admin-consent URL carrying the signed tenant state.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/patricia/apis/patricia-api.md) · [All operations](https://skmtc.dev/patricia/apis/patricia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/patricia/apis/patricia-api/revisions/0dfb44495ea1?raw)
