Overview

This API has been available since 1.28.0

This page contains the APIs that are used to manage Links that establish a relationship between a FusionAuth User and an Identity Provider.

This API is used to create a link between a FusionAuth User and a user in a 3rd party identity provider. This API may be useful when you already know the unique Id of a user in a 3rd party identity provider and the corresponding FusionAuth User.

Request

This API has been available since 1.43.0

API Key Authentication
Link a User
POST /api/identity-provider/link

Request Headers

X-FusionAuth-TenantIdString

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Body

identityProviderLink.displayNameString

A optional human readable name for this link such as an email address, username or given name. This value should be used to make it easier to identify the user this link represents in the remote identity provider.

Please note, that this value will always be overwritten during login to reflect the most current information from the identity provider. In most cases this value will be an email address or username.

identityProviderLink.identityProviderIdUUIDrequired

The Id of the identify provider that will be linked to the User.

identityProviderLink.identityProviderUserIdStringrequired

The Id for the user that is provided by the upstream identity provider. This is the value that will allow FusionAuth to link this User on future logins. This value is expected to be immutable.

identityProviderLink.userIdUUIDrequired

The unique Id of the FusionAuth User that is being linked to the identity provider.

identityProviderLink.tokenString

The token returned from the identity provider. This is treated as an opaque token as the type varies by identity provider, this value may not be returned by all identity providers. When provided, this token is typically a long lived access or refresh token, but consult individual identity provider documentation for specifics.

Example Request JSON
{
  "identityProviderLink": {
    "displayName": "richard@piedpiper.com",
    "identityProviderId": "f50dbb83-4cc2-4e5e-aece-9efe068bddd9",
    "identityProviderUserId": "42",
    "userId": "fbf0e652-b2b5-45eb-b9c9-d4640889740b",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
  }
}

Deprecated in version 1.43.0.

While this API is still functional, its usage is discouraged. When available please use the Link a User endpoint which takes a different request body.

API Key Authentication
Link a User
POST /api/identity-provider/link

Request Headers

X-FusionAuth-TenantIdString

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Body

displayNameStringAvailable since 1.28.1

An optional human readable name for this link such as an email address, username or given name. This value should be used to make it easier to identify the user this link represents in the remote identity provider.

Please note, that this value will always be overwritten during login to reflect the most current information from the identity provider. In most cases this value will be an email address or username.

identityProviderIdUUIDrequired

The Id of the identity provider.

identityProviderUserIdStringrequired

The Id for the User that is provided by the identity provider. This is the value that will allow FusionAuth to link this user on future logins. This value is expected to be immutable.

userIdUUIDrequired

The FusionAuth Id of the User that is being linked to the identity provider.

Example Request JSON
{
  "displayName": "richard@piedpiper.com",
  "identityProviderId": "f50dbb83-4cc2-4e5e-aece-9efe068bddd9",
  "identityProviderUserId": "42",
  "userId": "fbf0e652-b2b5-45eb-b9c9-d4640889740b"
}

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 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.
500 There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty.
504 One or more Webhook endpoints returned an invalid response or were unreachable. Based on the transaction configuration for this event your action cannot be completed. A stack trace is provided and logged in the FusionAuth log files.

Response Body

identityProviderLink.displayNameString

A optional human readable name for this link such as an email address, username or given name. This value should be used to make it easier to identify the user this link represents in the remote identity provider.

Please note, that this value will always be overwritten during login to reflect the most current information from the identity provider. In most cases this value will be an email address or username.

identityProviderLink.identityProviderIdUUID

The unique Id of the identity provider.

identityProviderLink.identityProviderNameStringAvailable since 1.47.0

The name of the identity provider.

identityProviderLink.identityProviderTypeString

The type of the identity provider.

identityProviderLink.identityProviderUserIdString

The Id for the User that is provided by the identity provider.

identityProviderLink.insertInstantLong

The instant the Link was created.

identityProviderLink.lastLoginInstantLong

The last instant of the User’s most recent login to the identity provider linked Application.

identityProviderLink.tenantIdUUID

The Id of the Tenant that this User belongs to.

identityProviderLink.tokenString

The token returned from the identity provider. This is treated as an opaque token as the type varies by identity provider, this value may not be returned by all identity providers. When provided, this token is typically a long lived access or refresh token, but consult individual identity provider documentation for specifics.

identityProviderLink.userIdUUID

The unique Id of the FusionAuth User that is linked to the identity provider.

Example Response JSON
{
  "identityProviderLink": {
    "displayName": "richard@piedpiper.com",
    "identityProviderId": "f50dbb83-4cc2-4e5e-aece-9efe068bddd9",
    "identityProviderName": "My OpenIDConnect Identity Provider",
    "identityProviderType": "OpenIDConnect",
    "identityProviderUserId": "42",
    "insertInstant": 1623183147998,
    "lastLoginInstant": 1623183152224,
    "tenantId": "30663132-6464-6665-3032-326466613934",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
    "userId": "fbf0e652-b2b5-45eb-b9c9-d4640889740b"
  }
}

This API is used complete a pending link. If an identity provider is configured with a linking strategy of Create a pending link, a pendingLinkId will be returned by the Identity Provider API (see the Complete the Login section for each respective IdP). This value can be used in the request below.

Request

Available Since Version 1.43.0

API Key Authentication
Complete a pending Link
POST /api/identity-provider/link

Request Headers

X-FusionAuth-TenantIdString

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Body

pendingIdPLinkIdStringrequired

The pending identity provider link Id.

identityProviderLink.userIdStringrequired

The unique Id of the FusionAuth User that is being linked to the identity provider.

Example Request JSON
{
  "pendingIdPLinkId": "elY3lKxvCQvsH_kfEMmBNLIl6TmydtCrNjHpFgVdxb8",
  "identityProviderLink": {
    "userId": "fbf0e652-b2b5-45eb-b9c9-d4640889740b"
  }
}

Deprecated in version 1.43.0.

While this API is still functional, its usage is discouraged. When available please use the Complete a Pending Link which takes a different request body.

API Key Authentication
Complete a pending Link
POST /api/identity-provider/link

Request Headers

X-FusionAuth-TenantIdString

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Body

pendingIdPLinkIdStringrequired

The pending identity provider link Id.

userIdStringrequired

The Id of the User that is being linked to the identity provider.

Example Request JSON
{
  "pendingIdPLinkId": "elY3lKxvCQvsH_kfEMmBNLIl6TmydtCrNjHpFgVdxb8",
  "userId": "fbf0e652-b2b5-45eb-b9c9-d4640889740b"
}

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 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.
500 There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty.
504 One or more Webhook endpoints returned an invalid response or were unreachable. Based on the transaction configuration for this event your action cannot be completed. A stack trace is provided and logged in the FusionAuth log files.

Response Body

identityProviderLink.displayNameString

A optional human readable name for this link such as an email address, username or given name. This value should be used to make it easier to identify the user this link represents in the remote identity provider.

Please note, that this value will always be overwritten during login to reflect the most current information from the identity provider. In most cases this value will be an email address or username.

identityProviderLink.identityProviderIdUUID

The unique Id of the identity provider.

identityProviderLink.identityProviderNameStringAvailable since 1.47.0

The name of the identity provider.

identityProviderLink.identityProviderTypeString

The type of the identity provider.

identityProviderLink.identityProviderUserIdString

The Id for the User that is provided by the identity provider.

identityProviderLink.insertInstantLong

The instant the Link was created.

identityProviderLink.lastLoginInstantLong

The last instant of the User’s most recent login to the identity provider linked Application.

identityProviderLink.tenantIdUUID

The Id of the Tenant that this User belongs to.

identityProviderLink.tokenString

The token returned from the identity provider. This is treated as an opaque token as the type varies by identity provider, this value may not be returned by all identity providers. When provided, this token is typically a long lived access or refresh token, but consult individual identity provider documentation for specifics.

identityProviderLink.userIdUUID

The unique Id of the FusionAuth User that is linked to the identity provider.

Example Response JSON
{
  "identityProviderLink": {
    "displayName": "richard@piedpiper.com",
    "identityProviderId": "f50dbb83-4cc2-4e5e-aece-9efe068bddd9",
    "identityProviderName": "My OpenIDConnect Identity Provider",
    "identityProviderType": "OpenIDConnect",
    "identityProviderUserId": "42",
    "insertInstant": 1623183147998,
    "lastLoginInstant": 1623183152224,
    "tenantId": "30663132-6464-6665-3032-326466613934",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
    "userId": "fbf0e652-b2b5-45eb-b9c9-d4640889740b"
  }
}

This API is used to retrieve a single Link, all Links for a specific identity provider and user, or all Links for a user.

Request

API Key Authentication
Retrieve a single link
GET /api/identity-provider/link ?identityProviderId={identityProviderId}&identityProviderUserId={identityProviderUserId}&userId={userId}

Request Headers

X-FusionAuth-TenantIdString

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Parameters

identityProviderIdUUIDrequired

The unique Id of the identity provider.

identityProviderUserIdStringrequired

The unique user Id in the 3rd party identity provider. Ideally this value never change and will always uniquely identify the user in the 3rd party identity provider.

userIdUUID

The FusionAuth User Id that is linked to the identity provider. When this value is provided, a 404 status code will be returned if the link does not exist, or the link exists but is linked to a different userId. If you wish to identify if any user is linked, omit this parameter.

API Key Authentication
Retrieve all links for a specific user by identity provider
GET /api/identity-provider/link ?identityProviderId={identityProviderId}&userId={userId}

Request Headers

X-FusionAuth-TenantIdString

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Parameters

identityProviderIdUUIDrequired

The unique Id of the identity provider.

userIdUUIDrequired

The FusionAuth User Id that is linked to the identity provider.

API Key Authentication
Retrieve all links for a user
GET /api/identity-provider/link ?userId={userId}

Request Headers

X-FusionAuth-TenantIdString

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Parameters

userIdUUIDrequired

The FusionAuth User Id that is linked to the identity provider.

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 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.
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

The response body for this API contains either a single Link or an array of Links. When you call this API with identityProviderId , identityProviderUserId , and optionally the userId , the response will contain a single Link. When you call this API with userId and either identityProviderId or identityProviderUserId , the response will contain an array of Links. All response types are defined below along with an example JSON response.

identityProviderLink.displayNameString

A optional human readable name for this link such as an email address, username or given name. This value should be used to make it easier to identify the user this link represents in the remote identity provider.

Please note, that this value will always be overwritten during login to reflect the most current information from the identity provider. In most cases this value will be an email address or username.

identityProviderLink.identityProviderIdUUID

The unique Id of the identity provider.

identityProviderLink.identityProviderNameStringAvailable since 1.47.0

The name of the identity provider.

identityProviderLink.identityProviderTypeStringAvailable since 1.46.0

The type of the identity provider.

identityProviderLink.identityProviderUserIdString

The unique user Id in the third party identity provider. Ideally this value never changes and will always uniquely identify the user in the third party identity provider.

identityProviderLink.insertInstantLong

The instant that the Link was created.

identityProviderLink.lastLoginInstantLong

The instant when the User logged in last with this identity provider using this link.

identityProviderLink.tenantIdUUID

The Id of the Tenant that this User belongs to.

identityProviderLink.tokenString

The token returned from the identity provider. This is treated as an opaque token as the type varies by identity provider, this value may not be returned by all identity providers. When provided, this token is typically a long lived access or refresh token, but consult individual identity provider documentation for specifics.

Note: Prior to version 1.28.0, this value can be retrieved using the User Registration APIs using the registration.token field.

identityProviderLink.userIdUUID

The FusionAuth User Id that is linked to the identity provider.

Example Response JSON
{
  "identityProviderLink": {
    "displayName": "richard@piedpiper.com",
    "identityProviderId": "f50dbb83-4cc2-4e5e-aece-9efe068bddd9",
    "identityProviderName": "My OpenIDConnect Identity Provider",
    "identityProviderType": "OpenIDConnect",
    "identityProviderUserId": "42",
    "insertInstant": 1623183147998,
    "lastLoginInstant": 1623183152224,
    "tenantId": "30663132-6464-6665-3032-326466613934",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
    "userId": "fbf0e652-b2b5-45eb-b9c9-d4640889740b"
  }
}

Response Body

identityProviderLinksArray

The list of Link objects.

identityProviderLinks[x].displayNameString

A optional human readable name for this link such as an email address, username or given name. This value should be used to make it easier to identify the user this link represents in the remote identity provider.

Please note, that this value will always be overwritten during login to reflect the most current information from the identity provider. In most cases this value will be an email address or username.

identityProviderLinks[x].identityProviderIdUUID

The unique Id of the identity provider.

identityProviderLinks[x].identityProviderNameStringAvailable since 1.47.0

The name of the identity provider.

identityProviderLinks[x].identityProviderTypeStringAvailable since 1.46.0

The type of the identity provider.

identityProviderLinks[x].identityProviderUserIdString

The unique user Id in the third party identity provider. Ideally this value never changes and will always uniquely identify the user in the third party identity provider.

identityProviderLinks[x].insertInstantLong

The instant that the Link was created.

identityProviderLinks[x].lastLoginInstantLong

The instant when the User logged in last with this identity provider using this link.

identityProviderLinks[x].tenantIdUUID

The Id of the Tenant that this User belongs to.

identityProviderLinks[x].tokenString

The token returned from the identity provider. This is treated as an opaque token as the type varies by identity provider, this value may not be returned by all identity providers. When provided, this token is typically a long lived access or refresh token, but consult individual identity provider documentation for specifics.

Note: Prior to version 1.28.0, this value can be retrieved using the User Registration APIs using the registration.token field.

identityProviderLinks[x].userIdUUID

The FusionAuth User Id that is linked to the identity provider.

Example Response JSON for a collection of Links
{
  "identityProviderLinks": [
    {
      "displayName": "richard@piedpiper.com",
      "identityProviderId": "f50dbb83-4cc2-4e5e-aece-9efe068bddd9",
      "identityProviderName": "My OpenIDConnect Identity Provider",
      "identityProviderType": "OpenIDConnect",
      "identityProviderUserId": "42",
      "insertInstant": 1623183147998,
      "lastLoginInstant": 1623183152224,
      "tenantId": "30663132-6464-6665-3032-326466613934",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI0MiIsIm5hbWUiOiJSaWNoYXJkIiwiaWF0IjoxNTE2MjM5MDIyfQ.hFtOTx0nZ58YNJlYLI9kV2Tt0Jg1yxdW7Gy-43V4clc",
      "userId": "fbf0e652-b2b5-45eb-b9c9-d4640889740b"
    },
    {
      "displayName": "richard@hooli.com",
      "identityProviderId": "363ae8d9-dd4d-4473-bdc6-3694f1d0329e",
      "identityProviderName": "Another OpenIDConnect Identity Provider",
      "identityProviderType": "OpenIDConnect",
      "identityProviderUserId": "9821123",
      "insertInstant": 1623183147998,
      "lastLoginInstant": 1623183152225,
      "tenantId": "30663132-6464-6665-3032-326466613934",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI5ODIxMTIzIiwibmFtZSI6IlJpY2hhcmQiLCJpYXQiOjE1MTYyMzkwMjJ9.bGRRUQBhdg6kS4sjiWrR-7xrOa6A2MzI9QhWlDcNf-Y",
      "userId": "fbf0e652-b2b5-45eb-b9c9-d4640889740b"
    }
  ]
}

This API has been available since 1.46.0

This API is used to retrieve a pending IdP Link. A pending IdP Link is created after a user completes login with an Identity Provider configured with a linking strategy of Create a Pending Link . This pending IdP link is then used to link a user in a 3rd party identity provider to a user in FusionAuth.

Retrieving this link may be useful if you are building your own login pages, and need to identify the Identity Provider or various meta-data associated with his pending link.

Request

API Key Authentication
Retrieve a single pending link by Id
GET /api/identity-provider/link/pending/{pendingLinkId} ?userId={userId}

Request Headers

X-FusionAuth-TenantIdString

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Parameters

pendingLinkIdStringrequired

The unique pending IdP Link Id.

userIdUUID

The optional User Id that you intend to link using this pending IdP Link. When provided the user’s current link count will be returned in the response body.

This can be useful if you are limiting the number of links a user may have to a single identity provider. This will help you understand if the link will succeed for this user.

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 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.
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

identityProviderTenantConfiguration.limitUserLinkCount.enabledBoolean

The tenant configuration for identity provider linking. If enabled the maximumLinks value will be enforced during linking. This will only be present if you have configured a tenant policy for this identity provider.

identityProviderTenantConfiguration.limitUserLinkCount.maximumLinksInteger

The maximum number of links a user can have to a single identity provider. This will only be present if you have configured a tenant policy for this identity provider.

linkCountLong

The user’s current link count. This will only be present if a userId was provided on the request.

pendingIdPLink.displayNameString

A optional human readable name for this link such as an email address, username or given name. This value should be used to make it easier to identify the user this link represents in the remote identity provider.

pendingIdPLink.emailString

The optional email address provided by the identity provider. This value will not always be present, it will depend upon the identity provider.

pendingIdPLink.identityProviderIdUUID

The unique Id of the identity provider.

pendingIdPLink.identityProviderNameUUID

The name of the identity provider.

pendingIdPLink.identityProviderTypeUUID

The type of the identity provider.

pendingIdPLink.identityProviderUserIdString

The unique user Id in the 3rd party identity provider. Ideally this value never changes and will always uniquely identify the user in the 3rd party identity provider.

pendingIdPLink.usernameString

The optional username provided by the identity provider. This value will not always be present, it will depend upon the identity provider.

Example Response JSON
{
  "identityProviderTenantConfiguration": {
    "limitUserLinkCount": {
      "enabled": false,
      "maximumLinks": 2
    }
  },
  "linkCount": 0,
  "pendingIdPLink": {
    "displayName": "richard@piedpiper.com",
    "email": "richard@piedpiper.com",
    "identityProviderId": "af53ab21-34c3-468a-8ba2-ecb3905f67f2",
    "identityProviderName": "Xbox",
    "identityProviderType": "Xbox",
    "identityProviderUserId": "42",
    "username": "richard"
  }
}

This API is used to remove a link between a FusionAuth User and a 3rd party identity provider.

Request

API Key Authentication
Delete the Link with the given Id
DELETE /api/identity-provider/link ?identityProviderId={identityProviderId}&identityProviderUserId={identityProviderUserId}&userId={userId}

Request Headers

X-FusionAuth-TenantIdString

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Parameters

identityProviderIdUUIDrequired

The unique Id of the identity provider.

identityProviderUserIdStringrequired

The Id for the user that is provided by the upstream identity provider. This is the value that will allow FusionAuth to link this user on future logins. This value is expected to be immutable.

userIdUUIDrequired

The FusionAuth User Id that is linked to the identity provider.

Response

This API does not return a JSON response body.

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 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.
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.