---
updatedAt: 2026-06-04T19:57:42.000Z
agentTools:
  projectIndex: https://docs.wristband.dev/llms.txt
---

# Fetch External IdP User Info For New User Invitation

Retrieves the user info synced from the external IdP that the user authenticated against.

### Required Permissions

Below is the list of required permissions needed to interact with this API.  For each permission, the allowed permission boundaries are also specified.

| Permission                               | Boundary    | Description                                                                                                       |
| ---------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------- |
| **new-user-invitation-workflow:execute** | Application | The subject can perform this operation for requests associated with the application to which the subject belongs. |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Workflow APIs",
    "version": "1.0.0",
    "description": "Workflow APIs",
    "license": {
      "name": "Private",
      "url": "https://wristband.dev/terms/"
    },
    "termsOfService": "https://wristband.dev/terms/",
    "contact": {
      "name": "Wristband Support",
      "email": "support@wristband.dev",
      "url": "https://wristband.dev/contact/"
    }
  },
  "servers": [
    {
      "url": "https://{application_vanity_domain}",
      "description": "Wristband application scoped URL.",
      "variables": {
        "application_vanity_domain": {
          "default": "yourapp-yourorg.us.wristband.dev",
          "description": "Wristband vanity domain scoped to a specific application."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "New User Invitation",
      "description": "New User Invitation",
      "x-displayName": "New User Invitation"
    }
  ],
  "paths": {
    "/api/v1/new-user-invitation/external-idp/fetch-userinfo": {
      "post": {
        "summary": "Fetch External IdP User Info For New User Invitation",
        "operationId": "fetchExternalIdpUserInfoForNewUserInvitationV1",
        "tags": [
          "New User Invitation"
        ],
        "security": [
          {
            "Workflow_APIs_BearerAuth": []
          }
        ],
        "requestBody": {
          "description": "External IdP New User Invitation Fetch User Info Request JSON object",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Workflow_APIs_ExternalIdpNewUserInvitationFetchUserInfoRequest"
              },
              "examples": {
                "Example 1": {
                  "value": {
                    "externalIdpAuthCode": "eyJraWQiOiJlbjBPcW9HOU8zVzUxWno5TE1mN2RjMzlzaDJwYi13SDJLNWF4ZzVuUUc4IiwidHlwIjoic2MrSldUIiwiYWxnIjoiSFMyNTYifQ.eyJwYXJ0aXRpb24iOjEsImV4cCI6MTY1OTU2NjMxMiwianRpIjoiejdrNmU0YndxdmZleGt6YjZjcmJuY2ludG0ifQ.I3W1hbT0YqTG9ZFOTP4lToB_7Z1q30P8jsRxJ0UkSew"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workflow_APIs_ExternalIdpNewUserInvitationFetchUserInfoResponse"
                },
                "examples": {
                  "Example 1": {
                    "$ref": "#/components/examples/Workflow_APIs_ExternalIdpNewUserInvitationFetchUserInfoResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Workflow_APIs_400-with-message-body"
          },
          "401": {
            "$ref": "#/components/responses/Workflow_APIs_401"
          },
          "403": {
            "$ref": "#/components/responses/Workflow_APIs_403"
          },
          "405": {
            "$ref": "#/components/responses/Workflow_APIs_405"
          },
          "406": {
            "$ref": "#/components/responses/Workflow_APIs_406"
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workflow_APIs_api-error"
                },
                "examples": {
                  "code - state_conflict": {
                    "value": {
                      "type": "base_error",
                      "code": "state_conflict",
                      "message": "Workflow action failed because application no longer exists",
                      "ticket": "11t7n71hi5e6t"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "$ref": "#/components/responses/Workflow_APIs_415"
          },
          "500": {
            "$ref": "#/components/responses/Workflow_APIs_500"
          },
          "503": {
            "$ref": "#/components/responses/Workflow_APIs_503"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Workflow_APIs_BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "Workflow_APIs_401": {
        "description": "Unauthorized",
        "headers": {
          "WWW-Authenticate": {
            "description": "Includes details on the failed authentication condition. This header is set in accordance with the [OAuth2 specification](https://datatracker.ietf.org/doc/html/rfc6750#section-3).",
            "schema": {
              "type": "string",
              "example": "Bearer error=\"invalid_token\", error_description=\"The provided access token was invalid\""
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Workflow_APIs_api-error"
            },
            "examples": {
              "code - unauthenticated": {
                "value": {
                  "type": "base_error",
                  "code": "invalid_access_token",
                  "message": "The provided access token was invalid",
                  "ticket": "1u0d0edhwbjsd"
                }
              }
            }
          }
        }
      },
      "Workflow_APIs_403": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Workflow_APIs_api-error"
            },
            "examples": {
              "code - unauthorized": {
                "value": {
                  "type": "base_error",
                  "code": "unauthorized",
                  "message": "The request failed authorization",
                  "ticket": "11t7n71hi5e6t"
                }
              }
            }
          }
        }
      },
      "Workflow_APIs_405": {
        "description": "Method Not Allowed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Workflow_APIs_api-error"
            },
            "examples": {
              "code - method_not_supported": {
                "value": {
                  "type": "base_error",
                  "code": "method_not_supported",
                  "message": "The specified HTTP method is not supported",
                  "ticket": "11t7n71hi5e6t"
                }
              }
            }
          }
        }
      },
      "Workflow_APIs_406": {
        "description": "Not Acceptable",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Workflow_APIs_api-error"
            },
            "examples": {
              "code - not_acceptable": {
                "value": {
                  "type": "base_error",
                  "code": "not_acceptable",
                  "message": "The Accept header was invalid",
                  "ticket": "11t7n71hi5e6t"
                }
              }
            }
          }
        }
      },
      "Workflow_APIs_415": {
        "description": "Unsupported Media Type",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Workflow_APIs_api-error"
            },
            "examples": {
              "code - unsupported_media_type": {
                "value": {
                  "type": "base_error",
                  "code": "unsupported_media_type",
                  "message": "The Content-Type header was invalid",
                  "ticket": "11t7n71hi5e6t"
                }
              }
            }
          }
        }
      },
      "Workflow_APIs_500": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Workflow_APIs_api-error"
            },
            "examples": {
              "code - internal_server_failure ": {
                "value": {
                  "type": "base_error",
                  "code": "internal_server_failure",
                  "message": "An unexpected error occurred while processing the request",
                  "ticket": "11t7n71hi5e6t"
                }
              }
            }
          }
        }
      },
      "Workflow_APIs_503": {
        "description": "Service Unavailable",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Workflow_APIs_api-error"
            },
            "examples": {
              "code - service_unavailable": {
                "value": {
                  "type": "base_error",
                  "code": "service_unavailable",
                  "message": "The service is currently unavailable",
                  "ticket": "11t7n71hi5e6t"
                }
              }
            }
          }
        }
      },
      "Workflow_APIs_400-with-message-body": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Workflow_APIs_api-error"
                },
                {
                  "$ref": "#/components/schemas/Workflow_APIs_constraint-violations-api-error"
                }
              ]
            },
            "examples": {
              "code - invalid_request": {
                "value": {
                  "type": "base_error",
                  "code": "invalid_request",
                  "message": "The request was invalid",
                  "ticket": "11t7n71hi5e6t"
                }
              },
              "code - request_constraint_violations": {
                "value": {
                  "type": "constraint_violations_error",
                  "code": "message_body_constraint_violations",
                  "message": "The message body contained invalid fields",
                  "ticket": "11t7n71hi5e6t",
                  "violations": {
                    "field1": {
                      "code": "too_long",
                      "constraintAttributes": {
                        "maxLength": 10
                      }
                    },
                    "field2": {
                      "code": "not_null"
                    }
                  }
                }
              },
              "code - message_body_constraint_violations": {
                "value": {
                  "type": "constraint_violations_error",
                  "code": "message_body_constraint_violations",
                  "message": "The message body contained invalid fields",
                  "ticket": "11t7n71hi5e6t",
                  "violations": {
                    "field1": {
                      "code": "too_long",
                      "constraintAttributes": {
                        "maxLength": 10
                      }
                    },
                    "field2": {
                      "code": "not_null"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "Workflow_APIs_api-error": {
        "title": "ApiError",
        "type": "object",
        "description": "API error object",
        "x-examples": {
          "Example 1": {
            "code": "invalid_request",
            "message": "The request was invalid",
            "ticket": "11t7n71hi5e6t"
          }
        },
        "properties": {
          "type": {
            "type": "string",
            "example": "base_error",
            "minLength": 1,
            "description": "The type of the API error.",
            "readOnly": true
          },
          "code": {
            "type": "string",
            "example": "invalid_request",
            "minLength": 1,
            "description": "A code identifying the error that occurred.",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "example": "The request was invalid",
            "description": "A free text message describing the error.  This error message is only meant to help developers understand the cause of the error.  It should not be used for programmatic purposes.",
            "readOnly": true
          },
          "ticket": {
            "type": "string",
            "example": "11t7n71hi5e6t",
            "description": "Ticket that can help correlate the error to the backend",
            "readOnly": true
          },
          "details": {
            "type": "object",
            "description": "A map of details about the error. The keys are defined by the API.",
            "additionalProperties": {},
            "example": {
              "attemptsRemaining": 4
            }
          }
        },
        "required": [
          "type",
          "code"
        ]
      },
      "Workflow_APIs_constraint-violations-api-error": {
        "title": "ConstraintViolationsApiError",
        "description": "An API error that occurred due to a constraint violation",
        "allOf": [
          {
            "$ref": "#/components/schemas/Workflow_APIs_api-error"
          },
          {
            "type": "object",
            "readOnly": true,
            "required": [
              "violations"
            ],
            "properties": {
              "violations": {
                "type": "object",
                "readOnly": true,
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "A code identifying the constraint violation.",
                    "minLength": 1,
                    "example": "too_long"
                  },
                  "constraintAttributes": {
                    "type": "object",
                    "description": "A map of constraint attribute values.",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "example": {
                      "maxLength": "10"
                    }
                  }
                }
              }
            }
          }
        ],
        "x-examples": {
          "Example 1": {
            "type": "constraint_violations_error",
            "code": "message_body_constraint_violations",
            "message": "The request contained invalid fields",
            "ticket": "11t7n71hi5e6t",
            "violations": {
              "field1": {
                "code": "too_long",
                "constraintAttributes": {
                  "maxLength": "10"
                }
              },
              "field2": {
                "code": "not_null"
              }
            }
          }
        }
      },
      "Workflow_APIs_ExternalIdpNewUserInvitationFetchUserInfoRequest": {
        "title": "External IdP New User Invitation Fetch User Info Request",
        "description": "Request to retrieve a user's information from an external IdP as part of a new user invitation workflow.",
        "type": "object",
        "x-tags": [
          "Models"
        ],
        "required": [
          "externalIdpAuthCode"
        ],
        "properties": {
          "externalIdpAuthCode": {
            "description": "The external IdP auth code that will be used to retrieve the user's information.",
            "type": "string",
            "minLength": 1,
            "example": "eyJraWQiOiJlbjBPcW9HOU8zVzUxWno5TE1mN2RjMzlzaDJwYi13SDJLNWF4ZzVuUUc4IiwidHlwIjoic2MrSldUIiwiYWxnIjoiSFMyNTYifQ.eyJwYXJ0aXRpb24iOjEsImV4cCI6MTY1OTU2NjMxMiwianRpIjoiejdrNmU0YndxdmZleGt6YjZjcmJuY2ludG0ifQ.I3W1hbT0YqTG9ZFOTP4lToB_7Z1q30P8jsRxJ0UkSew"
          }
        },
        "example": {
          "externalIdpAuthCode": "eyJraWQiOiJlbjBPcW9HOU8zVzUxWno5TE1mN2RjMzlzaDJwYi13SDJLNWF4ZzVuUUc4IiwidHlwIjoic2MrSldUIiwiYWxnIjoiSFMyNTYifQ.eyJwYXJ0aXRpb24iOjEsImV4cCI6MTY1OTU2NjMxMiwianRpIjoiejdrNmU0YndxdmZleGt6YjZjcmJuY2ludG0ifQ.I3W1hbT0YqTG9ZFOTP4lToB_7Z1q30P8jsRxJ0UkSew"
        }
      },
      "Workflow_APIs_ExternalIdpNewUserInvitationFetchUserInfoResponse": {
        "title": "External IdP New User Invitation Fetch User Info Response",
        "description": "Response to an external IdP new user invitation fetch user info workflow action.",
        "type": "object",
        "x-tags": [
          "Models"
        ],
        "properties": {
          "result": {
            "description": "Enum representing the result of a fetch user info request.\n\n**Supported Results:**\n- `USER_INFO_RETRIEVED`: Indicates that the fetch user info request completed successfully and retrieved the user's information.",
            "type": "string",
            "enum": [
              "USER_INFO_RETRIEVED"
            ],
            "example": "USER_INFO_RETRIEVED"
          },
          "externalId": {
            "description": "The user's primary identifier from the external identity provider.",
            "type": "string",
            "example": "1234"
          },
          "email": {
            "description": "The user's email address.",
            "type": "string",
            "format": "email",
            "example": "bob.smith@example.com"
          },
          "emailVerified": {
            "description": "Boolean indicating whether the user's email has been verified.",
            "type": "boolean",
            "example": true
          },
          "fullName": {
            "description": "User's full name in displayable form including all name parts, possibly including titles and suffixes.",
            "type": "string",
            "example": "Bob Jay Smith"
          },
          "givenName": {
            "description": "Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.",
            "type": "string",
            "example": "wpl4a4aa4jzydksmrf3jnu5yfc"
          },
          "familyName": {
            "description": "Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.",
            "type": "string",
            "example": "wpl4a4aa4jzydksmrf3jnu5yfc"
          },
          "phoneNumber": {
            "description": "User's telephone number in E164 format.",
            "type": "string",
            "example": "+16045551234"
          },
          "birthdate": {
            "description": "User's birthdate.",
            "type": "string",
            "example": "1999-03-29"
          }
        },
        "example": {
          "result": "USER_INFO_RETRIEVED",
          "externalId": "1234",
          "email": "bob.smith@example.com",
          "emailVerified": true,
          "fullName": "Bob Jay Smith",
          "givenName": "Bob",
          "familyName": "Smith",
          "phoneNumber": "+16045551234",
          "birthdate": "1999-03-29"
        }
      }
    },
    "examples": {
      "Workflow_APIs_ExternalIdpNewUserInvitationFetchUserInfoResponse": {
        "description": "Basic example of a External IdP New User Invitation Fetch User Info Response JSON object.",
        "value": {
          "result": "USER_INFO_RETRIEVED",
          "externalId": "1234",
          "email": "bob.smith@example.com",
          "emailVerified": true,
          "fullName": "Bob Jay Smith",
          "givenName": "Bob",
          "familyName": "Smith",
          "phoneNumber": "+16045551234",
          "birthdate": "1999-03-29"
        }
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Workflow APIs",
      "tags": [
        "Change Email",
        "Change Password",
        "Email Verification",
        "Existing User Invitation",
        "Login",
        "MFA Challenge",
        "Workflow APIs",
        "Workflow Request Object APIs",
        "MFA Enrollment",
        "New User Invitation",
        "Password Reset",
        "Signup",
        "Tenant Discovery",
        "User Activation"
      ]
    }
  ]
}
```