---
title: "Log in user via OpenID Connect and return login info"
method: POST
path: "/login/oidc"
tags: ["login"]
---

# Log in user via OpenID Connect and return login info

`POST /login/oidc`

Log in user and return login info:

- **token**: Bearer access token that can be used for authentication
- **roles**: Labels of user groups that user can see
- **permissions**: Permissions (octal) of the user in the MIRO Server namespace
- **username**: GAMS Engine username

## Request body

- OidcAuthRequest
  - `id_token` string, required

## Response `200`

Successful Response

- OidcAuthResponse
  - `token` string, required
  - `roles` string[], required
  - `permissions` string, required
  - `username` string, required

## Other responses

- `401` — Unauthorized
- `422` — Validation Error
- `500` — Internal Server Error

## Changes

- **2026-06-30** `358e5609409b` — 1 info
  - api operation id `login_oidc` removed and replaced with `login_oidc_login_oidc_post`
- **2026-02-24** `2ac7baf8418f` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2023-08-15** `6befde16ec1c` — 1 info
  - api operation id `login` removed and replaced with `login_oidc`
- **2023-03-30** `07eb81cc8e2e` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/gams-dev/apis/miro-server-api/changes/login/oidc/post.md)

---

[API](https://skmtc.dev/gams-dev/apis/miro-server-api.md) · [All operations](https://skmtc.dev/gams-dev/apis/miro-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gams-dev/miro-server-api/revisions/358e5609409b/schema)
