> For the complete documentation index, see [llms.txt](https://fusionauth.io/docs/llms.txt)

# Test

Learn about the APIs for starting an Identity Provider connection test and retrieving its results.

# Test

version

Available since version `1.65.0`

The Identity Provider connection testing API allows you to test an Identity Provider connection, even when disabled, to ensure that the configuration is correct and that FusionAuth can connect to the 3rd party provider. This API is useful for troubleshooting connectivity issues with an Identity Provider.

note

This API does not create or update users or registrations, or generate an authorization code or tokens.

## Start an Identity Provider Connection Test

### Request

[!API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#api-key-authentication)

Start an Identity Provider Connection Test for a given IdP and Tenant

POST/api/identity-provider/test

OpenAPI Spec

#### Request Body

`identityProviderId`UUIDrequired

The unique Id of the Identity Provider configuration to be tested.

`tenantId`UUIDrequired

The unique Id of the Tenant to use for this test. This field is required.

*Example Identity Provider Test Request JSON*

```json
{
  "identityProviderId": "4d3f5f7d-8e89-4c06-9d2b-8fbf8cdbb123",
  "tenantId": "9e8f88c4-9f89-49f2-9db5-6cbf6f4f9abc"
}
```

### Response

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |

#### Response Body

`connectionTestId`String

The unique Id of the identity provider connection test that was executed.

*Example Identity Provider Test Response JSON*

```json
{
  "connectionTestId": "f1e2d3c4-b5a6-47a8-9012-3456789abcde"
}
```

note

The returned `connectionTestId` is temporary and expires after the Tenant-configured external identifier TTL. Configure this value using `tenant.externalIdentifierConfiguration.identityProviderConnectionTestTimeToLiveInSeconds` (default `1800` seconds).

## Retrieve Identity Provider Connection Test Results

### Request

[!API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#api-key-authentication)

Retrieve Identity Provider Connection Test Results

GET/api/identity-provider/test?connectionTestId={connectionTestId}

OpenAPI Spec

#### Request Parameters

`connectionTestId`Stringrequired

The connection test Id returned by the Start Identity Provider Connection Test API.

### Response

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 404 | The object you requested doesn't exist. The response will be empty. |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |

#### Response Body

`result.success`Boolean

Whether the test completed successfully. This is `true` only when at least one step exists and all recorded steps succeeded.

`result.startInstant`DateTime

The instant at which the test began.

`result.identityProviderId`UUID

The Identity Provider Id used for the test.

`result.identityProviderUserId`Stringoptional

The third-party user Id resolved during the test, if available.

`result.email`Stringoptional

The reconciled email address, if available.

`result.username`Stringoptional

The reconciled username, if available.

`result.steps`Array<Object>

Ordered trace steps captured during the connection test.

`result.steps[].title`String

The step title.

`result.steps[].success`Boolean

Whether the step succeeded.

`result.steps[].detail`String

Additional detail for the step.

*Example Identity Provider Test Results Response JSON*

```json
{
  "result": {
    "success": true,
    "startInstant": "2026-04-21T15:04:05.123Z",
    "identityProviderId": "4d3f5f7d-8e89-4c06-9d2b-8fbf8cdbb123",
    "identityProviderUserId": "41",
    "email": "example@fusionauth.io",
    "username": "example",
    "steps": [
      {
        "title": "Success",
        "success": true,
        "detail": "The identity provider login successfully reconciled a user."
      }
    ]
  }
}
```