> ## Documentation Index
> Fetch the complete documentation index at: https://cal.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify a delegation credential's workspace setup

> Runs the same Google Workspace / Microsoft 365 check as enabling the credential, impersonating the authenticated user, without changing the credential. Works whether or not the credential is enabled. A failed check is returned as `verified: false` with the reason, not as an error. Required membership role: `org admin`. PBAC permission: `organization.update`. Learn more about API access control at https://cal.com/docs/api-reference/v2/access-control



## OpenAPI

````yaml /api-reference/v2/openapi.json post /v2/organizations/{orgId}/delegation-credentials/{credentialId}/verify
openapi: 3.0.0
info:
  title: Cal.com API v2
  description: ''
  version: 1.0.0
  contact: {}
servers: []
security: []
tags: []
paths:
  /v2/organizations/{orgId}/delegation-credentials/{credentialId}/verify:
    post:
      tags:
        - Orgs / Delegation Credentials
      summary: Verify a delegation credential's workspace setup
      description: >-
        Runs the same Google Workspace / Microsoft 365 check as enabling the
        credential, impersonating the authenticated user, without changing the
        credential. Works whether or not the credential is enabled. A failed
        check is returned as `verified: false` with the reason, not as an error.
        Required membership role: `org admin`. PBAC permission:
        `organization.update`. Learn more about API access control at
        https://cal.com/docs/api-reference/v2/access-control
      operationId: OrganizationsDelegationCredentialController_verifyDelegationCredential
      parameters:
        - name: Authorization
          in: header
          description: >-
            For non-platform customers - value must be `Bearer <token>` where
            `<token>` is api key prefixed with cal_
          required: false
          schema:
            type: string
        - name: x-cal-secret-key
          in: header
          description: For platform customers - OAuth client secret key
          required: false
          schema:
            type: string
        - name: x-cal-client-id
          in: header
          description: For platform customers - OAuth client ID
          required: false
          schema:
            type: string
        - name: orgId
          required: true
          in: path
          description: >-
            The unique identifier of the organization the delegation credential
            belongs to
          schema:
            type: number
            example: 123
        - name: credentialId
          required: true
          in: path
          description: The unique identifier of the delegation credential
          schema:
            example: clsx1234567890
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyDelegationCredentialOutput'
        '401':
          description: Authentication is missing or invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  timestamp:
                    type: string
                    example: '2024-04-01T00:00:00.000Z'
                  path:
                    type: string
                    example: >-
                      /v2/organizations/123/delegation-credentials/clsx1234567890/verify
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: UnauthorizedException
                      message:
                        type: string
        '403':
          description: >-
            The authenticated user is not an org admin, lacks the
            `organization.update` permission, or the organization is not on the
            required plan
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  timestamp:
                    type: string
                    example: '2024-04-01T00:00:00.000Z'
                  path:
                    type: string
                    example: >-
                      /v2/organizations/123/delegation-credentials/clsx1234567890/verify
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: ForbiddenException
                      message:
                        type: string
        '404':
          description: >-
            No delegation credential with the given id exists in the
            organization, or it belongs to a different organization
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  timestamp:
                    type: string
                    example: '2024-04-01T00:00:00.000Z'
                  path:
                    type: string
                    example: >-
                      /v2/organizations/123/delegation-credentials/clsx1234567890/verify
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: NotFoundException
                      message:
                        type: string
components:
  schemas:
    VerifyDelegationCredentialOutput:
      type: object
      properties:
        status:
          enum:
            - success
            - error
          type: string
          example: success
        data:
          $ref: '#/components/schemas/DelegationCredentialVerificationOutput'
      required:
        - status
        - data
    DelegationCredentialVerificationOutput:
      type: object
      properties:
        verified:
          type: boolean
          example: false
          description: Whether the workspace accepted the delegation credential
        errorCode:
          type: string
          nullable: true
          example: CalendarAppDelegationCredentialInvalidGrantError
          description: Classified reason the check failed; null when verified
        errorMessage:
          type: string
          nullable: true
          example: User might not exist in Google Workspace
          description: Human-readable reason the check failed; null when verified
        impersonatedEmailMatchesDomain:
          type: boolean
          example: false
          description: >-
            Whether the authenticated user's email is on the delegation
            credential's domain. The check impersonates that user, so false
            usually explains a failure.
      required:
        - verified
        - errorCode
        - errorMessage
        - impersonatedEmailMatchesDomain

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.