1. Docs
  2. API Reference
  3. Replace the roles an organization's directory may grant

Replace the roles an organization's directory may grant

PUT/api/v1/organizations/{id}/directory/grantable-roles

Replaces the whole list in one act. Withdrawing a role unmaps the groups that name it and releases the grants those mappings produced. An empty list removes the organization's own list: it then holds the Environment's identity-provider arrival roles when those are set, and otherwise directory sync is disabled for it, which is refused with 409 while its directory is live.

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.

Path Parameters

idstring Required

Request body

application/json

role_idsstring[] Required

The roles this organization's directory may grant. An empty list disables directory sync for the organization.

default_role_idstring Optional

The role somebody arrives with when no mapped group says otherwise. Required unless the list is empty, and must be one of `role_ids`.

Responses

application/json

  • itemsDirectoryGrantableRoleResponseDto[]*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Returned object

Request
curl -X PUT "https://auth.canopy-io.com/api/v1/organizations/value/directory/grantable-roles" \
  -H "X-API-Key: $CANOPY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "role_ids": [
      "string"
    ],
    "default_role_id": "string"
  }'
Response
{
  "items": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "is_default": false
    }
  ]
}
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
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
GETList organizations
POSTCreate an organization
DELETEDelete every organization
GETGet an organization
PATCHUpdate an organization
DELETEDelete an organization
GETGet an organization's authentication policy
PATCHUpdate an organization's authentication policy
POSTRegenerate the organization's SSO recovery codes
POSTStart a test sign-in on the organization's connection
GETRead the organization's test sign-in
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
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
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.