Update SAML IdP

PUT /v1/endpoints/{uuid}/saml/idps/{idp_uuid}

Replace a SAML IdP's settings. It is a full replace: send every setting, as Get SAML IdP answers them, with your changes. A setting left out is reset: the attributes to email, name and groups, the email domains and group rules to none, own_second_step to false. A metadata source left out keeps the current metadata. New metadata must name the same IdP (its entity ID): add another IdP as a new one. To turn it on or off, use Toggle SAML IdP. In the dashboard: Edit on the IdP's row.

Needs the endpoint_saml feature on the plan of the account that owns the endpoint (Enterprise) and the endpoints:update permission. Strict JSON decoding: unknown body fields return 400.

Path parameters

uuid string (uuid) Req
The endpoint's uuid from /endpoints.
idp_uuid string (uuid) Req
The IdP's uuid from List SAML IdPs.

An integer id in the path is refused with 400 integer_id_unsupported (see public IDs). Use the uuid.

Request body

The fields of Add SAML IdP: name and join_mode (required), metadata_url or metadata_xml (left out: the current metadata stays), email_domains, email_attribute, name_attribute, groups_attribute, group_roles and own_second_step.

Changed group rules apply at each user's next sign-in.

Response (200 OK)

The IdP, as Get SAML IdP answers it.

Errors

400 Bad Request
Invalid JSON or unknown fields; a missing or unusable field, named in the answer; both metadata sources; or metadata ngris can't use, with why (as for Add SAML IdP).
401 Unauthorized
Missing auth.
403 Forbidden
Caller lacks the endpoints:update permission, or the plan doesn't include SAML single sign-on ("entitlement_required": "endpoint_saml").
404 Not Found
Endpoint doesn't exist or doesn't belong to the calling account, the IdP isn't this endpoint's (SAML IdP not found), or a rule names a role the endpoint doesn't have.
409 Conflict
The new metadata names another IdP (the metadata names another IdP (another entity ID): add it as a new IdP instead), another IdP has this name, the endpoint has no address yet, or it is paused.
413 Payload Too Large
The request is too large: paste at most 1 MiB of metadata, or give its URL.
503 Service Unavailable
SAML single sign-on isn't available yet. Try again in a few minutes.
Request — add a group rule, keep the metadata
curl -X PUT "https://api.ngris.com/v1/endpoints/019bb1e4-e785-77d2-9966-c3cff31d0a0e/saml/idps/019c6a2e-4b10-7c3d-9e21-5a7f0b8c1d23" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme SSO", "join_mode": "anyone", "email_domains": ["acme.com"], "group_roles": [ {"group": "shop-admins", "role_uuid": "019b4b9d-d300-736b-8601-153b3d9f70aa"}, {"group": "support", "role_uuid": "019b4b9d-d300-736b-8601-153b3d9f70bb"} ], "own_second_step": false }'
Response
{ "uuid": "019c6a2e-4b10-7c3d-9e21-5a7f0b8c1d23", "name": "Acme SSO", "group_roles": [ {"group": "shop-admins", "role_uuid": "019b4b9d-d300-736b-8601-153b3d9f70aa", "role_name": "admin"}, {"group": "support", "role_uuid": "019b4b9d-d300-736b-8601-153b3d9f70bb", "role_name": "support"} ], … }
Was this helpful?
On this page
Update SAML IdP
Was this helpful?