WorkOS · Schema

Profile

AuthenticationIdentity ProviderSSOSAMLOIDCSCIMDirectory SyncAuthorizationFGAAudit LogsMFAB2B SaaSAgentsMCP

Properties

Name Type Description
object string Distinguishes the profile object.
id string Unique identifier of the profile.
organization_id stringnull The ID of the organization the user belongs to.
connection_id string The ID of the SSO connection used for authentication.
connection_type string The type of SSO connection.
idp_id string The user's unique identifier from the identity provider.
email string The user's email address.
first_name stringnull The user's first name.
last_name stringnull The user's last name.
name stringnull The user's full name.
role object The role assigned to the user within the organization, if applicable.
roles object The roles assigned to the user within the organization, if applicable.
groups array The groups the user belongs to, as returned by the identity provider.
custom_attributes object Custom attribute mappings defined for the connection, returned as key-value pairs.
raw_attributes object The complete set of raw attributes returned by the identity provider.
View JSON Schema on GitHub

JSON Schema

workos-profile-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Profile",
  "title": "Profile",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "description": "Distinguishes the profile object.",
      "example": "profile",
      "const": "profile"
    },
    "id": {
      "type": "string",
      "description": "Unique identifier of the profile.",
      "example": "prof_01DMC79VCBZ0NY2099737PSVF1"
    },
    "organization_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The ID of the organization the user belongs to.",
      "example": "org_01EHQMYV6MBK39QC5PZXHY59C3"
    },
    "connection_id": {
      "type": "string",
      "description": "The ID of the SSO connection used for authentication.",
      "example": "conn_01E4ZCR3C56J083X43JQXF3JK5"
    },
    "connection_type": {
      "type": "string",
      "enum": [
        "Pending",
        "ADFSSAML",
        "AdpOidc",
        "AppleOAuth",
        "Auth0Migration",
        "Auth0SAML",
        "AzureSAML",
        "BitbucketOAuth",
        "CasSAML",
        "ClassLinkSAML",
        "CleverOIDC",
        "CloudflareSAML",
        "CyberArkSAML",
        "DiscordOAuth",
        "DuoSAML",
        "EntraIdOIDC",
        "GenericOIDC",
        "GenericSAML",
        "GitHubOAuth",
        "GitLabOAuth",
        "GoogleOAuth",
        "GoogleOIDC",
        "GoogleSAML",
        "IntuitOAuth",
        "JumpCloudSAML",
        "KeycloakSAML",
        "LastPassSAML",
        "LinkedInOAuth",
        "LoginGovOidc",
        "MagicLink",
        "MicrosoftOAuth",
        "MiniOrangeSAML",
        "NetIqSAML",
        "OktaOIDC",
        "OktaSAML",
        "OneLoginSAML",
        "OracleSAML",
        "PingFederateSAML",
        "PingOneSAML",
        "RipplingSAML",
        "SalesforceSAML",
        "ShibbolethGenericSAML",
        "ShibbolethSAML",
        "SimpleSamlPhpSAML",
        "SalesforceOAuth",
        "SlackOAuth",
        "TestIdp",
        "VercelMarketplaceOAuth",
        "VercelOAuth",
        "VMwareSAML",
        "XeroOAuth"
      ],
      "description": "The type of SSO connection.",
      "example": "GoogleOAuth"
    },
    "idp_id": {
      "type": "string",
      "description": "The user's unique identifier from the identity provider.",
      "example": "103456789012345678901"
    },
    "email": {
      "type": "string",
      "description": "The user's email address.",
      "example": "[email protected]"
    },
    "first_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The user's first name.",
      "example": "Todd"
    },
    "last_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The user's last name.",
      "example": "Rundgren"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The user's full name.",
      "example": "Todd Rundgren"
    },
    "role": {
      "description": "The role assigned to the user within the organization, if applicable.",
      "oneOf": [
        {
          "$ref": "#/components/schemas/SlimRole"
        },
        {
          "type": "null"
        }
      ]
    },
    "roles": {
      "description": "The roles assigned to the user within the organization, if applicable.",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/SlimRole"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The groups the user belongs to, as returned by the identity provider.",
      "example": [
        "Engineering",
        "Admins"
      ]
    },
    "custom_attributes": {
      "type": "object",
      "additionalProperties": {},
      "description": "Custom attribute mappings defined for the connection, returned as key-value pairs."
    },
    "raw_attributes": {
      "type": "object",
      "additionalProperties": {},
      "description": "The complete set of raw attributes returned by the identity provider."
    }
  },
  "required": [
    "object",
    "id",
    "organization_id",
    "connection_id",
    "connection_type",
    "idp_id",
    "email",
    "first_name",
    "last_name",
    "name",
    "raw_attributes"
  ]
}