1. Docs
  2. API Reference
  3. Read the organization's test sign-in

Read the organization's test sign-in

GET/api/v1/organizations/{id}/sso-connection/test/{testId}

Reads a test sign-in by id. status is pending until the identity-provider round-trip returns, then completed with outcome (success or failed), the refusal reason when failed, the mapped email, first_name, last_name and federated_subject_id, the asserted amr, and domain_outcome: accepted, no_boundary (bound to no organization), not_listed, or not_verified. Responds 404 once the test has expired.

Authentication

Bearer TokenAuthorization Option A

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

API KeyX-API-Key Option B

API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.

Requires permission hierarchy.viewHierarchy

View hierarchy nodes. A scoped API key must hold it as a scope; a full-access key holds every scope within its Environment except the named-only and account scopes; a developer's token needs the Console capability that covers it. A credential without it is refused with 403.

Path Parameters

idstring Required
testIdstring Required

Headers

  • X-Canopy-Environment

    The id of the Environment this request acts in. Required with an account API key, which belongs to the Account and names its Environment per request; an Environment key may send it only to name its own Environment. A missing header for an account key answers `400` (`api_key.environment_required`), one naming no Environment of the key's Account `400` (`api_key.environment_not_found`), and one naming another Environment than an Environment key's own `400` (`api_key.environment_mismatch`).

Responses

application/json

  • dataSsoTestSignInResponseDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Errors

When the request can't be completed, the response body includes a stable error code you can branch on, and a correlation_id (also sent as the X-Correlation-Id header). Quote the correlation id when you contact support: it identifies the exact request in Canopy's logs. A request refused by an authorization check answers 403 with the code authorization.denied, and its data names the denial_reason and the permission checked.

403authorization.deniedForbidden
When it happens

The credential does not hold the permission this operation checks: a scoped API key without the scope, a developer without the Console capability that covers it, or a permission granted somewhere other than the node the request targets. The error's data names the permission.

Remediation

Add the permission named in the Authentication section to the key's scopes, or ask an account administrator to grant the covering capability, then retry. For a node-scoped operation, make sure the grant reaches the node you are acting on.

Returned object

Request
curl -X GET "https://auth.canopy-io.com/api/v1/organizations/value/sso-connection/test/value" \
  -H "X-Canopy-Environment: value" \
  -H "X-API-Key: $CANOPY_API_KEY"
Response
{
  "data": {
    "id": "string",
    "connection_id": "string",
    "environment_id": "string",
    "type": "saml",
    "status": "pending",
    "start_url": "string",
    "started_at": "2026-04-20T12:00:00.000Z",
    "expires_at": "2026-04-20T12:00:00.000Z",
    "outcome": "success",
    "reason": "string",
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "federated_subject_id": "string",
    "amr": [
      "string"
    ],
    "domain_outcome": "accepted",
    "missing_fields": [
      "string"
    ],
    "received_attributes": [
      "string"
    ],
    "name_id_format": "string",
    "hint": "set_name_id_email",
    "completed_at": "2026-04-20T12:00:00.000Z"
  }
}
Related endpoints
GETWhat the caller administers in an organization
GETList the organization's tree as the caller sees it
GETList who holds a role at a node in the organization
GETList who holds a permission at a node in the organization
GETSummarize who holds a role at a node in the organization
GETList the roles the caller may grant at a node
GETList the organization's members, for granting a role at a node
POSTGrant a role at a node beneath the organization
PATCHChange a grant in the organization
DELETETake a grant in the organization away
GETRead the schema an organization's tree follows
POSTCreate a node inside an organization
GETRead a node inside an organization
PATCHRename a node inside an organization
DELETEDelete a node inside an organization
POSTPreview moving a node inside an organization
POSTMove a node inside an organization
POSTPreview deleting a node inside an organization
GETList organizations
POSTCreate an organization
DELETEDelete every organization
GETGet an organization
PATCHUpdate an organization
DELETEDelete an organization
POSTPreview deleting an organization
GETGet an organization's authentication policy
PATCHUpdate an organization's authentication policy
GETList staff entries into an organization
POSTRegenerate the organization's SSO recovery codes
POSTStart a test sign-in on the organization's connection
GETList the organization's domain claims
POSTClaim a domain for the organization
POSTVerify one of the organization's domains
DELETERemove one of the organization's domain claims
GETList an organization's SSO connections
POSTBind an SSO connection to an organization
DELETEUnbind an SSO connection from an organization
GETList an organization's members
POSTAdd a member to an organization
DELETERemove a member from an organization
POSTReset a member's multi-factor authentication
GETList an organization's invitations
POSTInvite a member into an organization
GETList the roles an organization may assign
POSTCreate an organization's own role
DELETERevoke an organization invitation
GETGet an organization's SSO connection
POSTSet up an organization's SSO connection
PATCHChange an organization's SSO connection
DELETERemove an organization's SSO connection
POSTActivate an organization's SSO connection
POSTDisable an organization's SSO connection
POSTImport the identity provider's SAML metadata
GETList the connection's recent sign-ins
GETList the roles the organization's SSO sign-ins may arrive with
GETGet the service-provider values for an organization's SSO connection
GETGet an organization's directory connection
POSTCreate an organization's directory connection
DELETERemove an organization's directory connection
GETList an organization's directory-sync tokens
POSTMint a directory-sync token for an organization
POSTReplace a directory-sync token without an outage
DELETERevoke a directory-sync token
GETRecent directory-sync activity for an organization
GETList the roles an organization's directory may grant
PUTReplace the roles an organization's directory may grant
GETList an organization's integrations
POSTCreate an integration
GETList the roles an organization may give its integrations
GETGet one of an organization's integrations
PATCHRename, disable or enable an integration
DELETEDelete an integration
POSTRotate an integration's secret
GETList an integration's roles
POSTGive an integration a role
PATCHChange one of an integration's roles
DELETETake one of an integration's roles away
GETCount an organization's own roles
GETList the permissions a role editor may attach
GETGet one role an organization can use
PATCHRename or describe an organization's own role
DELETEDelete an organization's own role
PUTReplace an organization role's permissions
GETList the groups an organization's provider has pushed
PUTMap a pushed group to one of the available roles
DELETEClear a pushed group's role mapping
Was this page helpful?

Tell us how we can improve this guide.