{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/mongodb/main/json-schema/mongodb-federation-oidc-identity-provider-update-schema.json",
  "title": "FederationOidcIdentityProviderUpdate",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mongodb-federated-authentication-api-openapi.yml#/components/schemas/FederationOidcIdentityProviderUpdate",
  "oneOf": [
    {
      "$ref": "#/$defs/FederationOidcWorkforceIdentityProviderUpdate"
    },
    {
      "$ref": "#/$defs/FederationOidcWorkloadIdentityProviderUpdate"
    }
  ],
  "properties": {
    "audience": {
      "description": "Identifier of the intended recipient of the token.",
      "type": "string"
    },
    "authorizationType": {
      "description": "Indicates whether authorization is granted based on group membership or user ID.",
      "enum": [
        "GROUP",
        "USER"
      ],
      "type": "string"
    },
    "description": {
      "description": "The description of the identity provider.",
      "type": "string"
    },
    "displayName": {
      "description": "Human-readable label that identifies the identity provider.",
      "maxLength": 50,
      "minLength": 1,
      "type": "string"
    },
    "groupsClaim": {
      "description": "Identifier of the claim which contains IdP Group IDs in the token.",
      "type": "string"
    },
    "idpType": {
      "description": "String enum that indicates the type of the identity provider. Default is WORKFORCE.",
      "enum": [
        "WORKFORCE",
        "WORKLOAD"
      ],
      "type": "string"
    },
    "issuerUri": {
      "description": "Unique string that identifies the issuer of the SAML Assertion or OIDC metadata/discovery document URL.",
      "type": "string"
    },
    "protocol": {
      "description": "String enum that indicates the protocol of the identity provider. Either SAML or OIDC.",
      "enum": [
        "SAML",
        "OIDC"
      ],
      "type": "string"
    },
    "userClaim": {
      "description": "Identifier of the claim which contains the user ID in the token.",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "FederationOidcWorkforceIdentityProviderUpdate": {
      "properties": {
        "associatedDomains": {
          "description": "List that contains the domains associated with the identity provider.",
          "items": {
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        },
        "audience": {
          "description": "Identifier of the intended recipient of the token.",
          "type": "string"
        },
        "authorizationType": {
          "description": "Indicates whether authorization is granted based on group membership or user ID.",
          "enum": [
            "GROUP",
            "USER"
          ],
          "type": "string"
        },
        "clientId": {
          "description": "Client identifier that is assigned to an application by the Identity Provider.",
          "type": "string"
        },
        "description": {
          "description": "The description of the identity provider.",
          "type": "string"
        },
        "displayName": {
          "description": "Human-readable label that identifies the identity provider.",
          "maxLength": 50,
          "minLength": 1,
          "type": "string"
        },
        "groupsClaim": {
          "description": "Identifier of the claim which contains IdP Group IDs in the token.",
          "type": "string"
        },
        "idpType": {
          "description": "String enum that indicates the type of the identity provider. Default is WORKFORCE.",
          "enum": [
            "WORKFORCE",
            "WORKLOAD"
          ],
          "type": "string"
        },
        "issuerUri": {
          "description": "Unique string that identifies the issuer of the SAML Assertion or OIDC metadata/discovery document URL.",
          "type": "string"
        },
        "protocol": {
          "description": "String enum that indicates the protocol of the identity provider. Either SAML or OIDC.",
          "enum": [
            "SAML",
            "OIDC"
          ],
          "type": "string"
        },
        "requestedScopes": {
          "description": "Scopes that MongoDB applications will request from the authorization endpoint.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "userClaim": {
          "description": "Identifier of the claim which contains the user ID in the token.",
          "type": "string"
        }
      },
      "title": "OIDC WORKFORCE",
      "type": "object"
    },
    "FederationOidcWorkloadIdentityProviderUpdate": {
      "properties": {
        "audience": {
          "description": "Identifier of the intended recipient of the token.",
          "type": "string"
        },
        "authorizationType": {
          "description": "Indicates whether authorization is granted based on group membership or user ID.",
          "enum": [
            "GROUP",
            "USER"
          ],
          "type": "string"
        },
        "description": {
          "description": "The description of the identity provider.",
          "type": "string"
        },
        "displayName": {
          "description": "Human-readable label that identifies the identity provider.",
          "maxLength": 50,
          "minLength": 1,
          "type": "string"
        },
        "groupsClaim": {
          "description": "Identifier of the claim which contains IdP Group IDs in the token.",
          "type": "string"
        },
        "idpType": {
          "description": "String enum that indicates the type of the identity provider. Default is WORKFORCE.",
          "enum": [
            "WORKFORCE",
            "WORKLOAD"
          ],
          "type": "string"
        },
        "issuerUri": {
          "description": "Unique string that identifies the issuer of the SAML Assertion or OIDC metadata/discovery document URL.",
          "type": "string"
        },
        "protocol": {
          "description": "String enum that indicates the protocol of the identity provider. Either SAML or OIDC.",
          "enum": [
            "SAML",
            "OIDC"
          ],
          "type": "string"
        },
        "userClaim": {
          "description": "Identifier of the claim which contains the user ID in the token.",
          "type": "string"
        }
      },
      "title": "OIDC WORKLOAD",
      "type": "object"
    }
  }
}