---
title: "Link your organization's members to its IdP (owner)"
method: POST
path: "/v1/organizations/{organization_id}/sso/members/link"
tags: ["organizations"]
---

# Link your organization's members to its IdP (owner)

`POST /v1/organizations/{organization_id}/sso/members/link`

## Request

- Base URL: `https://api.ethiack.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ethiack.com/v1/organizations/{organization_id}/sso/members/link`
- Auth: none declared

Pre-create the IdP links the organization's members need for SSO.

The self-service equivalent of the migration CLI ``link-sso-members``: an
owner links their own members so that arming ``require_sso`` does not lock
the unlinked ones out. Idempotent -- already-linked members report as such --
so it is safe to re-run after fixing whatever stopped one.

Args:
    organization_id (int): The parent organization.
    db (AsyncSession): Request-scoped session.
    context (ActiveContext): Resolved caller.

Returns:
    dict[str, object]: How many were linked, already linked, and still need
        attention with a reason for each of the last, serialized through
        ``response_model=MemberLinkSummaryResponse``.

## Path parameters

- `organization_id` integer, required

## Response `200`

Successful Response

- MemberLinkSummaryResponse: Result of linking an organization's members to its IdP. Counts plus only the members that need attention -- a fully successful run returns empty ``needs_attention`` and no per-member rows.
  - `linked` integer, required: Members newly linked by this run.
  - `already_linked` integer, required: Members that were already linked.
  - `needs_attention` integer, required: Members that could not be linked as they are.
  - `unresolved` MemberLinkOutcome[], required: The members counted in ``needs_attention``, with reasons.
    - `email` string, required: The member's address the link is keyed on.
    - `status` string, required: What happened: failed, blocked, miskeyed, or no idp identity.
    - `detail` string, required: Why, and what to change.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ethiack/apis/ethiack-api.md) - [All operations](https://skmtc.dev/ethiack/apis/ethiack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ethiack/apis/ethiack-api/revisions/4eaba89bfebf?raw)
