{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daytona-io/json-schema/daytona-io-update-identity-provider-schema.json",
  "title": "UpdateIdentityProvider",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daytona-io-organizations-api-openapi.yml#/components/schemas/UpdateIdentityProvider",
  "properties": {
    "name": {
      "description": "Display name for the identity provider",
      "type": "string"
    },
    "oidcConfig": {
      "allOf": [
        {
          "$ref": "#/$defs/UpdateOidcIdPConfig"
        }
      ],
      "description": "OIDC configuration"
    },
    "emailDomains": {
      "description": "Email domains used for IdP discovery on the login form and to validate the user identity returned by the IdP. If provided and `allowAnyDomain` is not being set to true, must contain at least one domain. To clear domains in the same request, set `allowAnyDomain: true` and `emailDomains: []`.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "allowAnyDomain": {
      "description": "When true, the IdP accepts any email domain returned by the external provider. Disables the post-callback domain check and allows `emailDomains` to be empty. Only enable for trusted IdPs that strictly control which users can authenticate.",
      "type": "boolean"
    },
    "trustEmailVerified": {
      "description": "When true, skip the `email_verified` claim check on SSO logins through this identity provider. Only intended for providers that never emit the claim (e.g. Microsoft Entra ID). Risky: only enable if the IdP strictly controls its users' email addresses.",
      "type": "boolean"
    },
    "defaultAssignedRoleIds": {
      "description": "Organization role IDs assigned to users who join the organization via SSO through this identity provider. Roles must be global or belong to this organization. Empty grants the lowest access: membership with no resource permissions.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "enabled": {
      "description": "Whether the identity provider is enabled",
      "type": "boolean"
    }
  },
  "type": "object",
  "$defs": {
    "UpdateOidcIdPConfig": {
      "properties": {
        "issuerUrl": {
          "description": "OIDC Issuer URL",
          "type": "string"
        },
        "clientId": {
          "description": "OAuth Client ID",
          "type": "string"
        },
        "clientSecret": {
          "description": "OAuth Client Secret",
          "type": "string"
        },
        "scope": {
          "description": "OAuth scopes",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}