Tenant APIs

1. Overview

A FusionAuth Tenant is a named object that represents a discrete namespace for Users, Applications and Groups. A user is unique by email address or username within a tenant.

Tenants may be useful to support a multi-tenant application where you wish to use a single instance of FusionAuth but require the ability to have duplicate users across the tenants in your own application. In this scenario a user may exist multiple times with the same email address and different passwords across tenants.

Tenants may also be useful in a test or staging environment to allow multiple users to call APIs and create and modify users without possibility of collision.

The following APIs are provided to manage Tenants.

The following APIs provide a subset of the Tenant configuration without an API Key.

2. Create a Tenant

This API is used to create a new Tenant.

2.1. Request

Create a Tenant with a randomly generated Id

URI

POST /api/tenant

Create a Tenant with the provided unique Id

URI

POST /api/tenant/{tenantId}

Table 1. Request Parameters

tenantId [UUID] Optional defaults to secure random UUID

The Id to use for the new Tenant. If not specified a secure random UUID will be generated.

Table 2. Request Body

tenant.data [Object] Optional

An object that can hold any information about the Tenant that should be persisted.

tenant.emailConfiguration.enabled [Boolean] Optional Deprecated

When this value is set to true the email configuration provided by this tenant will take precedence over the configuration by the System Configuration.

  Removed in version 1.8.0 In version 1.8.0 and beyond, a Tenant’s email configuration is enabled upon configuration.

tenant.emailConfiguration.forgotPasswordEmailTemplateId [UUID] Optional

The Id of the Email Template that is used when a user is sent a forgot password email.

tenant.emailConfiguration.host [String] Required Available Since 1.8.0

The host name of the SMTP server that FusionAuth will use.

tenant.emailConfiguration.password [String] Optional Available Since 1.8.0

An optional password FusionAuth will use to authenticate with the SMTP server.

tenant.emailConfiguration.passwordlessEmailTemplateId [UUID] Optional Available Since 1.8.0

The Id of the Passwordless Email Template.

tenant.emailConfiguration.port [Integer] Required Available Since 1.8.0

The port of the SMTP server that FusionAuth will use.

tenant.emailConfiguration.properties [String] Optional Available Since 1.8.0

Additional Email Configuration in a properties file formatted String.

tenant.emailConfiguration.security String Optional defaults to NONE Available Since 1.8.0

The type of security protocol FusionAuth will use when connecting to the SMTP server. The possible values are:

  • NONE - no security will be used. All communications will be sent plaintext.

  • SSL - SSL will be used to connect to the SMTP server. This protocol is not recommended unless it is the only one your SMTP server supports.

  • TLS - TLS will be used to connect to the SMTP server. This is the preferred protocol for all SMTP servers.

tenant.emailConfiguration.setPasswordEmailTemplateId [UUID] Optional

The Id of the Email Template that is used when a user had their account created for them and they must set their password manually and they are sent an email to set their password.

tenant.emailConfiguration.username [String] Optional Available Since 1.8.0

An optional username FusionAuth will to authenticate with the SMTP server.

tenant.emailConfiguration.verificationEmailTemplateId [UUID] Optional

The If of the Email Template that is used to send the verification emails to users. These emails are used to verify that a user’s email address is valid. If either the verifyEmail or verifyEmailWhenChanged fields are true this field is required.

tenant.emailConfiguration.verifyEmail [Boolean] Optional defaults to false

Whether the user’s email addresses are verified when the registers with your application.

tenant.emailConfiguration.verifyEmailWhenChanged [Boolean] Optional defaults to false

Whether the user’s email addresses are verified when the user changes them.

tenant.eventConfiguration.events [Object] Optional defaults to {} Available Since 1.8.0

A mapping of the configuration for each event type that FusionAuth sends. The event types that are the keys into this Object are:

  • user.action - When a user action is triggered

  • user.bulk.create - When multiple users are created in bulk (i.e. during an import)

  • user.create - When a user is created

  • user.email.verified - When a user verifies their email address

  • user.update - When a user is updated

  • user.deactivate - When a user is deactivated

  • user.reactivate - When a user is reactivated

  • user.login.success - When a user completes a login request

  • user.login.failed - When a user fails a login request

  • user.registration.create - When a user registration is created

  • user.registration.update - When a user registration is updated

  • user.registration.delete - When a user registration is deleted

  • user.registration.verified - When a user completes registration verification

  • user.delete - When a user is deleted

  • jwt.public-key.update - When a JWT RSA Public / Private keypair may have been changed

  • jwt.refresh-token.revoke - When a JWT Refresh Token is revoked

tenant.eventConfiguration.events[type].enabled [Boolean] Optional defaults to false Available Since 1.8.0

Whether or not FusionAuth should send these types of events to any configured Webhooks.

tenant.eventConfiguration.events[type].transactionType String Optional Available Since 1.8.0

The transaction type that FusionAuth uses when sending these types of events to any configured Webhooks. The transaction types are:

  • None - No Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • Any - Only a single Webhook is required to succeed for the FusionAuth transaction to be committed.

  • SimpleMajority - A simple majority (50% or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • SuperMajority - A super majority (2/3 or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • AbsoluteMajority - Every Webhook must succeed for the FusionAuth transaction to be committed.

tenant.externalIdentifierConfiguration.authorizationGrantIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a OAuth authorization code in no longer valid to be exchanged for an access token. This is essentially the time allowed between the start of an Authorization request during the Authorization code grant and when you request an access token using this authorization code on the Token endpoint.

Value must be greater than 0 and less than or equal to 600.

tenant.externalIdentifierConfiguration.changePasswordIdGenerator.length [Integer] Required Available Since 1.8.0

The length of the secure generator used for generating the change password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.changePasswordIdGenerator.type [String] Required Available Since 1.8.0

The type of the secure generator used for generating the change password Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.changePasswordIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a change password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.emailVerificationIdGenerator.length [Integer] Required Available Since 1.8.0

The length of the secure generator used for generating the email verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.emailVerificationIdGenerator.type [String] Required Available Since 1.8.0

The type of the secure generator used for generating the email verification Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.emailVerificationIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a email verification Id is no longer valid and cannot be used by the Verify Email API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.oneTimePasswordTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a One Time Password is no longer valid and cannot be used by the Login API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.passwordlessLoginGenerator.length [Integer] Required Available Since 1.8.0

The length of the secure generator used for generating the passwordless login.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.passwordlessLoginGenerator.type [String] Required Available Since 1.8.0

The type of the secure generator used for generating the passwordless login. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.passwordlessLoginTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a passwordless code is no longer valid and cannot be used by the Passwordless API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.registrationVerificationIdGenerator.length [Integer] Required Available Since 1.8.0

The length of the secure generator used for generating the registration verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.registrationVerificationIdGenerator.type [String] Required Available Since 1.8.0

The type of the secure generator used for generating the registration verification Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.registrationVerificationIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a registration verification Id is no longer valid and cannot be used by the Verify Registration API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.setupPasswordIdGenerator.length [Integer] Required Available Since 1.8.0

The length of the secure generator used for generating the setup password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.setupPasswordIdGenerator.type [String] Required Available Since 1.8.0

The type of the secure generator used for generating the setup password Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.setupPasswordIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a setup password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.twoFactorIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a two factor Id is no longer valid and cannot be used by the Two Factor Login API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.twoFactorTrustIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until an issued Two Factor trust Id is no longer valid and the User will be required to complete Two Factor authentication during the next authentication attempt. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.actionDuration [Long] Required defaults to 3 Available Since 1.8.0

The duration of the User Action. This value along with the actionDurationUnit will be used to set the duration of the User Action. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.actionDurationUnit [String] Required defaults to "MINUTES" Available Since 1.8.0

The unit of time associated with a duration. The possible values are:

  • MINUTES

  • HOURS

  • DAYS

  • WEEKS

  • MONTHS

  • YEARS

tenant.failedAuthenticationConfiguration.resetCountInSeconds [Integer] Required defaults to 60 Available Since 1.8.0

The length of time in seconds before the failed authentication count will be reset. Value must be greater than 0.

For example, if tooManyAttempts is set to 5 and you fail to authenticate 4 times in a row, waiting for the duration specified here will cause your fifth attempt to start back at 1.

tenant.failedAuthenticationConfiguration.tooManyAttempts [Integer] Required defaults to 5 Available Since 1.8.0

The number of failed attempts considered to be too many. Once this threshold is reached the specified User Action will be applied to the user for the duration specified. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.userActionId [UUID] Optional Available Since 1.8.0

The Id of the User Action that is applied when the threshold is reached for too many failed authentication attempts.

tenant.familyConfiguration.allowChildRegistrations [Boolean] Optional defaults to true Available Since 1.8.0

Whether to allow child registrations.

tenant.familyConfiguration.confirmChildEmailTemplateId [UUID] Optional Available Since 1.8.0

The unique Id of the email template to use when confirming a child.

tenant.familyConfiguration.deleteOrphanedAccounts [Boolean] Optional defaults to false Available Since 1.8.0

Whether to delete accounts that have been orphaned.

tenant.familyConfiguration.deleteOrphanedAccountsDays [Integer] Optional defaults to 30 Available Since 1.8.0

The number of days after an account has been orphaned before it is deleted. Value must be greater than 0.

tenant.familyConfiguration.enabled [Boolean] Optional defaults to false Available Since 1.8.0

Whether family configuration is enabled.

tenant.familyConfiguration.familyRequestEmailTemplateId [UUID] Optional Available Since 1.8.0

The unique Id of the email template to use when a family request is made.

tenant.familyConfiguration.maximumChildAge [Integer] Optional defaults to 12 Available Since 1.8.0

The maximum age of a child. Value must be greater than 0.

tenant.familyConfiguration.minimumOwnerAge [Integer] Optional defaults to 21 Available Since 1.8.0

The minimum age to be an owner. Value must be greater than 0.

tenant.familyConfiguration.parentEmailRequired [Boolean] Optional defaults to false Available Since 1.8.0

Whether a parent email is required.

tenant.familyConfiguration.parentRegistrationEmailTemplateId [UUID] Optional Available Since 1.8.0

The unique Id of the email template to use for parent registration.

tenant.httpSessionMaxInactiveInterval [Integer] Optional default is 3600 Available Since 1.8.0

Time in seconds until an inactive session will be invalidated. Used when creating a new session in the FusionAuth OAuth frontend.

tenant.issuer [String] Required Available Since 1.8.0

The named issuer used to sign tokens, this is generally your public fully qualified domain.

tenant.jwtConfiguration.accessTokenKeyId [UUID] Required Available Since 1.8.0

The unique id of the signing key used to sign the access token.

tenant.jwtConfiguration.idTokenKeyId [UUID] Required Available Since 1.8.0

The unique id of the signing key used to sign the Id token.

tenant.jwtConfiguration.refreshTokenTimeToLiveInMinutes [Integer] Required Available Since 1.8.0

The length of time in minutes a Refresh Token is valid from the time it was issued. Value must be greater than 0.

tenant.jwtConfiguration.timeToLiveInSeconds [Integer] Required Available Since 1.8.0

The length of time in seconds this JWT is valid from the time it was issued. Value must be greater than 0.

tenant.logoutURL [String] Optional Available Since 1.8.0

The logout redirect URL when sending the user’s browser to the /oauth2/logout URI of the FusionAuth Front End. This value is only used when a logout URL is not defined in your Application.

tenant.maximumPasswordAge.days [Integer] Optional defaults to 180 Available Since 1.8.0

The password maximum age in days. The number of days after which FusionAuth will require a user to change their password. Required when systemConfiguration.maximumPasswordAge.enabled is set to true.

tenant.maximumPasswordAge.enabled [Boolean] Optional defaults to false Available Since 1.8.0

Indicates that the maximum password age is enabled and being enforced.

tenant.minimumPasswordAge.seconds [Integer] Optional defaults to 30 Available Since 1.8.0

The password minimum age in seconds. When enabled FusionAuth will not allow a password to be changed until it reaches this minimum age. Required when systemConfiguration.minimumPasswordAge.enabled is set to true.

tenant.minimumPasswordAge.enabled [Boolean] Optional defaults to false Available Since 1.8.0

Indicates that the minimum password age is enabled and being enforced.

tenant.name [String] Required

The unique name of the Tenant.

tenant.passwordEncryptionConfiguration.encryptionScheme [String] Optional defaults to "salted-pbkdf2-hmac-sha256" Available Since 1.8.0

The default method for encrypting the User’s password. The following encryptors are provided with FusionAuth:

tenant.passwordEncryptionConfiguration.encryptionSchemeFactor [Integer] Optional defaults to 24000 Available Since 1.8.0

The factor used by the password encryption scheme. If not provided, the PasswordEncryptor provides a default value. Generally this will be used as an iteration count to generate the hash. The actual use of this value is up to the PasswordEncryptor implementation.

tenant.passwordEncryptionConfiguration.modifyEncryptionSchemeOnLogin [Boolean] Optional defaults to false Available Since 1.8.0

When enabled a user’s hash configuration will be modified to match these configured settings. This can be useful to increase a password hash strength over time or upgrade imported users to a more secure encryption scheme after an initial import.

tenant.passwordValidationRules.maxLength [Integer] Required defaults to 256 Available Since 1.8.0

The maximum length of a password when a new user is created or a user requests a password change.

tenant.passwordValidationRules.minLength [Integer] Required defaults to 8 Available Since 1.8.0

The minimum length of a password when a new user is created or a user requests a password change.

tenant.passwordValidationRules.rememberPreviousPasswords.count [Integer] Optional Available Since 1.8.0

The number of previous passwords to remember. Value must be greater than 0.

tenant.passwordValidationRules.rememberPreviousPasswords.enabled [Boolean] Optional defaults to false Available Since 1.8.0

Whether to prevent a user from using any of their previous passwords.

tenant.passwordValidationRules.requiredMixedCase [Boolean] Optional defaults to false Available Since 1.8.0

Whether to force the user to use at least one uppercase and one lowercase character.

tenant.passwordValidationRules.requireNonAlpha [Boolean] Optional defaults to false Available Since 1.8.0

Whether to force the user to use at least one non-alphanumeric character.

tenant.passwordValidationRules.requireNumber [Boolean] Optional defaults to false Available Since 1.8.0

Whether to force the user to use at least one number.

tenant.themeId [UUID] Required Available Since 1.8.0

The unique Id of the theme to be used to style the login page and other end user templates.

Example Request JSON
{
  "tenant": {
    "data": {
      "description": "No more secrets, Marty."
    },
    "emailConfiguration": {
      "forgotPasswordEmailTemplateId": "49aba1de-0225-45d7-a2b1-f9fe46b0242c",
      "host": "smtp.sendgrid.net",
      "password": "password",
      "passwordlessEmailTemplateId": "a917e23a-da58-4cda-be01-90f542f8c343",
      "port": 587,
      "properties": {
        "key": "value"
      },
      "security": "TLS",
      "setPasswordEmailTemplateId": "a9aba13e-0125-4fd7-a2b1-aaa146b02423",
      "username": "username",
      "verificationEmailTemplateId": "8da42c09-461c-45f3-b931-6e9f63b87ab5",
      "verifyEmail": true,
      "verifyEmailWhenChanged": true
    },
    "eventConfiguration": {
      "events": {
        "user.delete": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.deactivate": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.bulk.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.reactivate": {
          "enabled": true,
          "transactionType": "None"
        },
        "jwt.refresh-token.revoke": {
          "enabled": true,
          "transactionType": "None"
        },
        "jwt.public-key.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.login.success": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.login.failed": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.delete": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.verified": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.email.verified": {
          "enabled": true,
          "transactionType": "None"
        }
      }
    },
    "externalIdentifierConfiguration": {
      "authorizationGrantIdTimeToLiveInSeconds": 30,
      "changePasswordIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "changePasswordIdTimeToLiveInSeconds": 600,
      "emailVerificationIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "emailVerificationIdTimeToLiveInSeconds": 86400,
      "oneTimePasswordTimeToLiveInSeconds": 60,
      "passwordlessLoginGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "passwordlessLoginTimeToLiveInSeconds": 180,
      "registrationVerificationIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "registrationVerificationIdTimeToLiveInSeconds": 86400,
      "setupPasswordIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "setupPasswordIdTimeToLiveInSeconds": 86400,
      "twoFactorIdTimeToLiveInSeconds": 300,
      "twoFactorTrustIdTimeToLiveInSeconds": 2592000
    },
    "failedAuthenticationConfiguration": {
      "actionDuration": 3,
      "actionDurationUnit": "MINUTES",
      "resetCountInSeconds": 60,
      "tooManyAttempts": 5,
      "userActionId": "16cfc707-268c-4c5b-8989-f71f3ee156d4"
    },
    "familyConfiguration": {
      "allowChildRegistrations": true,
      "confirmChildEmailTemplateId": "87654321-4321-8765-ba09-ba0987654321",
      "deleteOrphanedAccounts": false,
      "deleteOrphanedAccountsDays": 30,
      "enabled": true,
      "familyRequestEmailTemplateId": "57462514-a73b-cd76-0001-b8a65cd61230",
      "maximumChildAge": 12,
      "minimumOwnerAge": 21,
      "parentEmailRequired": false,
      "parentRegistrationEmailTemplateId": "12345678-1234-5678-90ab-1234567890ab"
    },
    "httpSessionMaxInactiveInterval": 3600,
    "issuer": "https://example.com",
    "jwtConfiguration": {
      "accessTokenKeyId": "025233ca-d4f3-2aa4-eca9-7e4200e9b472",
      "enabled": true,
      "idTokenKeyId": "092dbedc-30af-4149-9c61-b578f2c72f59",
      "refreshTokenTimeToLiveInMinutes": 43200,
      "timeToLiveInSeconds": 3600
    },
    "logoutURL": "http://example.com/logout",
    "maximumPasswordAge": {
      "days": 180,
      "enabled": false
    },
    "minimumPasswordAge": {
      "enabled": false,
      "seconds": 30
    },
    "name": "Playtronics Co.",
    "passwordEncryptionConfiguration": {
      "encryptionScheme": "salted-pbkdf2-hmac-sha256",
      "encryptionSchemeFactor": 24000,
      "modifyEncryptionSchemeOnLogin": false
    },
    "passwordValidationRules": {
      "maxLength": 256,
      "minLength": 8,
      "rememberPreviousPasswords": {
        "count": 2,
        "enabled": true
      },
      "requireMixedCase": true,
      "requireNonAlpha": true,
      "requireNumber": true
    },
    "themeId": "c6ad3fac-6f32-4db7-91a4-061ff035e871"
  }
}

2.2. Response

The response for this API contains the Tenant that was created.

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

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.

503

The search index is not available or encountered an exception so the request cannot be completed. The response will contain a JSON body.

Table 4. Response Body for a single Tenant

tenant.data [Object]

An object that can hold any information about the Tenant that should be persisted.

tenant.emailConfiguration.enabled [Boolean] Deprecated

When this value is set to true the email configuration provided by this tenant will take precedence over the configuration by the System Configuration.

  Removed in version 1.8.0 In version 1.8.0 and beyond, a Tenant’s email configuration is enabled upon configuration.

tenant.emailConfiguration.forgotPasswordEmailTemplateId [UUID]

The Id of the Email Template that is used when a user is sent a forgot password email.

tenant.emailConfiguration.host [String] Available Since 1.8.0

The host name of the SMTP server that FusionAuth will use.

tenant.emailConfiguration.password [String] Available Since 1.8.0

An optional password FusionAuth will use to authenticate with the SMTP server.

tenant.emailConfiguration.passwordlessEmailTemplateId [UUID] Available Since 1.8.0

The Id of the Passwordless Email Template.

tenant.emailConfiguration.port [Integer] Available Since 1.8.0

The port of the SMTP server that FusionAuth will use.

tenant.emailConfiguration.properties [String] Available Since 1.8.0

Additional Email Configuration in a properties file formatted String.

tenant.emailConfiguration.security String Available Since 1.8.0

The type of security protocol FusionAuth will use when connecting to the SMTP server. The possible values are:

  • NONE - no security will be used. All communications will be sent plaintext.

  • SSL - SSL will be used to connect to the SMTP server. This protocol is not recommended unless it is the only one your SMTP server supports.

  • TLS - TLS will be used to connect to the SMTP server. This is the preferred protocol for all SMTP servers.

tenant.emailConfiguration.setPasswordEmailTemplateId [UUID]

The Id of the Email Template that is used when a user had their account created for them and they must set their password manually and they are sent an email to set their password.

tenant.emailConfiguration.username [String] Available Since 1.8.0

An optional username FusionAuth will to authenticate with the SMTP server.

tenant.emailConfiguration.verificationEmailTemplateId [UUID]

The If of the Email Template that is used to send the verification emails to users. These emails are used to verify that a user’s email address is valid. If either the verifyEmail or verifyEmailWhenChanged fields are true this field is required.

tenant.emailConfiguration.verifyEmail [Boolean]

Whether the user’s email addresses are verified when the registers with your application.

tenant.emailConfiguration.verifyEmailWhenChanged [Boolean]

Whether the user’s email addresses are verified when the user changes them.

tenant.eventConfiguration.events [Object] Available Since 1.8.0

A mapping of the configuration for each event type that FusionAuth sends. The event types that are the keys into this Object are:

  • user.action - When a user action is triggered

  • user.bulk.create - When multiple users are created in bulk (i.e. during an import)

  • user.create - When a user is created

  • user.email.verified - When a user verifies their email address

  • user.update - When a user is updated

  • user.deactivate - When a user is deactivated

  • user.reactivate - When a user is reactivated

  • user.login.success - When a user completes a login request

  • user.login.failed - When a user fails a login request

  • user.registration.create - When a user registration is created

  • user.registration.update - When a user registration is updated

  • user.registration.delete - When a user registration is deleted

  • user.registration.verified - When a user completes registration verification

  • user.delete - When a user is deleted

  • jwt.public-key.update - When a JWT RSA Public / Private keypair may have been changed

  • jwt.refresh-token.revoke - When a JWT Refresh Token is revoked

tenant.eventConfiguration.events[type].enabled [Boolean] Available Since 1.8.0

Whether or not FusionAuth should send these types of events to any configured Webhooks.

tenant.eventConfiguration.events[type].transactionType String Available Since 1.8.0

The transaction type that FusionAuth uses when sending these types of events to any configured Webhooks. The transaction types are:

  • None - No Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • Any - Only a single Webhook is required to succeed for the FusionAuth transaction to be committed.

  • SimpleMajority - A simple majority (50% or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • SuperMajority - A super majority (2/3 or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • AbsoluteMajority - Every Webhook must succeed for the FusionAuth transaction to be committed.

tenant.externalIdentifierConfiguration.authorizationGrantIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a OAuth authorization code in no longer valid to be exchanged for an access token. This is essentially the time allowed between the start of an Authorization request during the Authorization code grant and when you request an access token using this authorization code on the Token endpoint.

Value must be greater than 0 and less than or equal to 600.

tenant.externalIdentifierConfiguration.changePasswordIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the change password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.changePasswordIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the change password Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.changePasswordIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a change password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.emailVerificationIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the email verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.emailVerificationIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the email verification Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.emailVerificationIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a email verification Id is no longer valid and cannot be used by the Verify Email API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.oneTimePasswordTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a One Time Password is no longer valid and cannot be used by the Login API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.passwordlessLoginGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the passwordless login.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.passwordlessLoginGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the passwordless login. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.passwordlessLoginTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a passwordless code is no longer valid and cannot be used by the Passwordless API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.registrationVerificationIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the registration verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.registrationVerificationIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the registration verification Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.registrationVerificationIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a registration verification Id is no longer valid and cannot be used by the Verify Registration API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.setupPasswordIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the setup password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.setupPasswordIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the setup password Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.setupPasswordIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a setup password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.twoFactorIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a two factor Id is no longer valid and cannot be used by the Two Factor Login API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.twoFactorTrustIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until an issued Two Factor trust Id is no longer valid and the User will be required to complete Two Factor authentication during the next authentication attempt. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.actionDuration [Long] Available Since 1.8.0

The duration of the User Action. This value along with the actionDurationUnit will be used to set the duration of the User Action. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.actionDurationUnit [String] Available Since 1.8.0

The unit of time associated with a duration. The possible values are:

  • MINUTES

  • HOURS

  • DAYS

  • WEEKS

  • MONTHS

  • YEARS

tenant.failedAuthenticationConfiguration.resetCountInSeconds [Integer] Available Since 1.8.0

The length of time in seconds before the failed authentication count will be reset. Value must be greater than 0.

For example, if tooManyAttempts is set to 5 and you fail to authenticate 4 times in a row, waiting for the duration specified here will cause your fifth attempt to start back at 1.

tenant.failedAuthenticationConfiguration.tooManyAttempts [Integer] Available Since 1.8.0

The number of failed attempts considered to be too many. Once this threshold is reached the specified User Action will be applied to the user for the duration specified. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.userActionId [UUID] Available Since 1.8.0

The Id of the User Action that is applied when the threshold is reached for too many failed authentication attempts.

tenant.familyConfiguration.allowChildRegistrations [Boolean] Available Since 1.8.0

Whether to allow child registrations.

tenant.familyConfiguration.confirmChildEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use when confirming a child.

tenant.familyConfiguration.deleteOrphanedAccounts [Boolean] Available Since 1.8.0

Whether to delete accounts that have been orphaned.

tenant.familyConfiguration.deleteOrphanedAccountsDays [Integer] Available Since 1.8.0

The number of days after an account has been orphaned before it is deleted. Value must be greater than 0.

tenant.familyConfiguration.enabled [Boolean] Available Since 1.8.0

Whether family configuration is enabled.

tenant.familyConfiguration.familyRequestEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use when a family request is made.

tenant.familyConfiguration.maximumChildAge [Integer] Available Since 1.8.0

The maximum age of a child. Value must be greater than 0.

tenant.familyConfiguration.minimumOwnerAge [Integer] Available Since 1.8.0

The minimum age to be an owner. Value must be greater than 0.

tenant.familyConfiguration.parentEmailRequired [Boolean] Available Since 1.8.0

Whether a parent email is required.

tenant.familyConfiguration.parentRegistrationEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use for parent registration.

tenant.httpSessionMaxInactiveInterval [Integer] Available Since 1.8.0

Time in seconds until an inactive session will be invalidated. Used when creating a new session in the FusionAuth OAuth frontend.

tenant.id [UUID]

The unique identifier for this Tenant.

tenant.issuer [String] Available Since 1.8.0

The named issuer used to sign tokens, this is generally your public fully qualified domain.

tenant.jwtConfiguration.accessTokenKeyId [UUID] Available Since 1.8.0

The unique id of the signing key used to sign the access token.

tenant.jwtConfiguration.idTokenKeyId [UUID] Available Since 1.8.0

The unique id of the signing key used to sign the Id token.

tenant.jwtConfiguration.refreshTokenTimeToLiveInMinutes [Integer] Available Since 1.8.0

The length of time in minutes a Refresh Token is valid from the time it was issued. Value must be greater than 0.

tenant.jwtConfiguration.timeToLiveInSeconds [Integer] Available Since 1.8.0

The length of time in seconds this JWT is valid from the time it was issued. Value must be greater than 0.

tenant.logoutURL [String] Available Since 1.8.0

The logout redirect URL when sending the user’s browser to the /oauth2/logout URI of the FusionAuth Front End. This value is only used when a logout URL is not defined in your Application.

tenant.maximumPasswordAge.days [Integer] Available Since 1.8.0

The password maximum age in days. The number of days after which FusionAuth will require a user to change their password. Required when systemConfiguration.maximumPasswordAge.enabled is set to true.

tenant.maximumPasswordAge.enabled [Boolean] Available Since 1.8.0

Indicates that the maximum password age is enabled and being enforced.

tenant.minimumPasswordAge.seconds [Integer] Available Since 1.8.0

The password minimum age in seconds. When enabled FusionAuth will not allow a password to be changed until it reaches this minimum age. Required when systemConfiguration.minimumPasswordAge.enabled is set to true.

tenant.minimumPasswordAge.enabled [Boolean] Available Since 1.8.0

Indicates that the minimum password age is enabled and being enforced.

tenant.name [String]

The unique name of the Tenant.

tenant.passwordEncryptionConfiguration.encryptionScheme [String] Available Since 1.8.0

The default method for encrypting the User’s password. The following encryptors are provided with FusionAuth:

tenant.passwordEncryptionConfiguration.encryptionSchemeFactor [Integer] Available Since 1.8.0

The factor used by the password encryption scheme. If not provided, the PasswordEncryptor provides a default value. Generally this will be used as an iteration count to generate the hash. The actual use of this value is up to the PasswordEncryptor implementation.

tenant.passwordEncryptionConfiguration.modifyEncryptionSchemeOnLogin [Boolean] Available Since 1.8.0

When enabled a user’s hash configuration will be modified to match these configured settings. This can be useful to increase a password hash strength over time or upgrade imported users to a more secure encryption scheme after an initial import.

tenant.passwordValidationRules.maxLength [Integer] Available Since 1.8.0

The maximum length of a password when a new user is created or a user requests a password change.

tenant.passwordValidationRules.minLength [Integer] Available Since 1.8.0

The minimum length of a password when a new user is created or a user requests a password change.

tenant.passwordValidationRules.rememberPreviousPasswords.count [Integer] Available Since 1.8.0

The number of previous passwords to remember. Value must be greater than 0.

tenant.passwordValidationRules.rememberPreviousPasswords.enabled [Boolean] Available Since 1.8.0

Whether to prevent a user from using any of their previous passwords.

tenant.passwordValidationRules.requiredMixedCase [Boolean] Available Since 1.8.0

Whether to force the user to use at least one uppercase and one lowercase character.

tenant.passwordValidationRules.requireNonAlpha [Boolean] Available Since 1.8.0

Whether to force the user to use at least one non-alphanumeric character.

tenant.passwordValidationRules.requireNumber [Boolean] Available Since 1.8.0

Whether to force the user to use at least one number.

tenant.themeId [UUID] Available Since 1.8.0

The unique Id of the theme to be used to style the login page and other end user templates.

Example Response JSON
{
  "tenant": {
    "data": {
      "description": "No more secrets, Marty."
    },
    "emailConfiguration": {
      "forgotPasswordEmailTemplateId": "49aba1de-0225-45d7-a2b1-f9fe46b0242c",
      "host": "smtp.sendgrid.net",
      "password": "password",
      "passwordlessEmailTemplateId": "a917e23a-da58-4cda-be01-90f542f8c343",
      "port": 587,
      "properties": {
        "key": "value"
      },
      "security": "TLS",
      "setPasswordEmailTemplateId": "a9aba13e-0125-4fd7-a2b1-aaa146b02423",
      "username": "username",
      "verificationEmailTemplateId": "8da42c09-461c-45f3-b931-6e9f63b87ab5",
      "verifyEmail": true,
      "verifyEmailWhenChanged": true
    },
    "eventConfiguration": {
      "events": {
        "user.delete": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.deactivate": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.bulk.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.reactivate": {
          "enabled": true,
          "transactionType": "None"
        },
        "jwt.refresh-token.revoke": {
          "enabled": true,
          "transactionType": "None"
        },
        "jwt.public-key.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.login.success": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.login.failed": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.delete": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.verified": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.email.verified": {
          "enabled": true,
          "transactionType": "None"
        }
      }
    },
    "externalIdentifierConfiguration": {
      "authorizationGrantIdTimeToLiveInSeconds": 30,
      "changePasswordIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "changePasswordIdTimeToLiveInSeconds": 600,
      "emailVerificationIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "emailVerificationIdTimeToLiveInSeconds": 86400,
      "oneTimePasswordTimeToLiveInSeconds": 60,
      "passwordlessLoginGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "passwordlessLoginTimeToLiveInSeconds": 180,
      "registrationVerificationIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "registrationVerificationIdTimeToLiveInSeconds": 86400,
      "setupPasswordIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "setupPasswordIdTimeToLiveInSeconds": 86400,
      "twoFactorIdTimeToLiveInSeconds": 300,
      "twoFactorTrustIdTimeToLiveInSeconds": 2592000
    },
    "failedAuthenticationConfiguration": {
      "actionDuration": 3,
      "actionDurationUnit": "MINUTES",
      "resetCountInSeconds": 60,
      "tooManyAttempts": 5,
      "userActionId": "16cfc707-268c-4c5b-8989-f71f3ee156d4"
    },
    "familyConfiguration": {
      "allowChildRegistrations": true,
      "confirmChildEmailTemplateId": "87654321-4321-8765-ba09-ba0987654321",
      "deleteOrphanedAccounts": false,
      "deleteOrphanedAccountsDays": 30,
      "enabled": true,
      "familyRequestEmailTemplateId": "57462514-a73b-cd76-0001-b8a65cd61230",
      "maximumChildAge": 12,
      "minimumOwnerAge": 21,
      "parentEmailRequired": false,
      "parentRegistrationEmailTemplateId": "12345678-1234-5678-90ab-1234567890ab"
    },
    "httpSessionMaxInactiveInterval": 3600,
    "id": "32306536-3036-6431-3865-646430303332",
    "issuer": "https://example.com",
    "jwtConfiguration": {
      "accessTokenKeyId": "025233ca-d4f3-2aa4-eca9-7e4200e9b472",
      "enabled": true,
      "idTokenKeyId": "092dbedc-30af-4149-9c61-b578f2c72f59",
      "refreshTokenTimeToLiveInMinutes": 43200,
      "timeToLiveInSeconds": 3600
    },
    "logoutURL": "http://example.com/logout",
    "maximumPasswordAge": {
      "days": 180,
      "enabled": false
    },
    "minimumPasswordAge": {
      "enabled": false,
      "seconds": 30
    },
    "name": "Playtronics Co.",
    "passwordEncryptionConfiguration": {
      "encryptionScheme": "salted-pbkdf2-hmac-sha256",
      "encryptionSchemeFactor": 24000,
      "modifyEncryptionSchemeOnLogin": false
    },
    "passwordValidationRules": {
      "maxLength": 256,
      "minLength": 8,
      "rememberPreviousPasswords": {
        "count": 2,
        "enabled": true
      },
      "requireMixedCase": true,
      "requireNonAlpha": true,
      "requireNumber": true
    },
    "themeId": "c6ad3fac-6f32-4db7-91a4-061ff035e871"
  }
}

3. Retrieve a Tenant

This API is used to retrieve a single Tenant by unique Id or all of the configured Tenants.

3.1. Request

Retrieve all of the Tenants

URI

GET /api/tenant

Retrieve a Tenant by Id

URI

GET /api/tenant/{tenantId}

Table 5. Request Parameters

tenantId [UUID] Required

The unique Id of the Tenant to retrieve.

3.2. Response

The response for this API contains either a single Tenant or all of the Tenants. When you call this API with an Id the response will contain a single Tenant. When you call this API without an Id the response will contain all of the Tenants. Both response types are defined below along with an example JSON response.

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

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.

503

The search index is not available or encountered an exception so the request cannot be completed. The response will contain a JSON body.

Table 7. Response Body for a single Tenant

tenant.data [Object]

An object that can hold any information about the Tenant that should be persisted.

tenant.emailConfiguration.enabled [Boolean] Deprecated

When this value is set to true the email configuration provided by this tenant will take precedence over the configuration by the System Configuration.

  Removed in version 1.8.0 In version 1.8.0 and beyond, a Tenant’s email configuration is enabled upon configuration.

tenant.emailConfiguration.forgotPasswordEmailTemplateId [UUID]

The Id of the Email Template that is used when a user is sent a forgot password email.

tenant.emailConfiguration.host [String] Available Since 1.8.0

The host name of the SMTP server that FusionAuth will use.

tenant.emailConfiguration.password [String] Available Since 1.8.0

An optional password FusionAuth will use to authenticate with the SMTP server.

tenant.emailConfiguration.passwordlessEmailTemplateId [UUID] Available Since 1.8.0

The Id of the Passwordless Email Template.

tenant.emailConfiguration.port [Integer] Available Since 1.8.0

The port of the SMTP server that FusionAuth will use.

tenant.emailConfiguration.properties [String] Available Since 1.8.0

Additional Email Configuration in a properties file formatted String.

tenant.emailConfiguration.security String Available Since 1.8.0

The type of security protocol FusionAuth will use when connecting to the SMTP server. The possible values are:

  • NONE - no security will be used. All communications will be sent plaintext.

  • SSL - SSL will be used to connect to the SMTP server. This protocol is not recommended unless it is the only one your SMTP server supports.

  • TLS - TLS will be used to connect to the SMTP server. This is the preferred protocol for all SMTP servers.

tenant.emailConfiguration.setPasswordEmailTemplateId [UUID]

The Id of the Email Template that is used when a user had their account created for them and they must set their password manually and they are sent an email to set their password.

tenant.emailConfiguration.username [String] Available Since 1.8.0

An optional username FusionAuth will to authenticate with the SMTP server.

tenant.emailConfiguration.verificationEmailTemplateId [UUID]

The If of the Email Template that is used to send the verification emails to users. These emails are used to verify that a user’s email address is valid. If either the verifyEmail or verifyEmailWhenChanged fields are true this field is required.

tenant.emailConfiguration.verifyEmail [Boolean]

Whether the user’s email addresses are verified when the registers with your application.

tenant.emailConfiguration.verifyEmailWhenChanged [Boolean]

Whether the user’s email addresses are verified when the user changes them.

tenant.eventConfiguration.events [Object] Available Since 1.8.0

A mapping of the configuration for each event type that FusionAuth sends. The event types that are the keys into this Object are:

  • user.action - When a user action is triggered

  • user.bulk.create - When multiple users are created in bulk (i.e. during an import)

  • user.create - When a user is created

  • user.email.verified - When a user verifies their email address

  • user.update - When a user is updated

  • user.deactivate - When a user is deactivated

  • user.reactivate - When a user is reactivated

  • user.login.success - When a user completes a login request

  • user.login.failed - When a user fails a login request

  • user.registration.create - When a user registration is created

  • user.registration.update - When a user registration is updated

  • user.registration.delete - When a user registration is deleted

  • user.registration.verified - When a user completes registration verification

  • user.delete - When a user is deleted

  • jwt.public-key.update - When a JWT RSA Public / Private keypair may have been changed

  • jwt.refresh-token.revoke - When a JWT Refresh Token is revoked

tenant.eventConfiguration.events[type].enabled [Boolean] Available Since 1.8.0

Whether or not FusionAuth should send these types of events to any configured Webhooks.

tenant.eventConfiguration.events[type].transactionType String Available Since 1.8.0

The transaction type that FusionAuth uses when sending these types of events to any configured Webhooks. The transaction types are:

  • None - No Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • Any - Only a single Webhook is required to succeed for the FusionAuth transaction to be committed.

  • SimpleMajority - A simple majority (50% or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • SuperMajority - A super majority (2/3 or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • AbsoluteMajority - Every Webhook must succeed for the FusionAuth transaction to be committed.

tenant.externalIdentifierConfiguration.authorizationGrantIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a OAuth authorization code in no longer valid to be exchanged for an access token. This is essentially the time allowed between the start of an Authorization request during the Authorization code grant and when you request an access token using this authorization code on the Token endpoint.

Value must be greater than 0 and less than or equal to 600.

tenant.externalIdentifierConfiguration.changePasswordIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the change password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.changePasswordIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the change password Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.changePasswordIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a change password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.emailVerificationIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the email verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.emailVerificationIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the email verification Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.emailVerificationIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a email verification Id is no longer valid and cannot be used by the Verify Email API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.oneTimePasswordTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a One Time Password is no longer valid and cannot be used by the Login API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.passwordlessLoginGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the passwordless login.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.passwordlessLoginGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the passwordless login. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.passwordlessLoginTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a passwordless code is no longer valid and cannot be used by the Passwordless API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.registrationVerificationIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the registration verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.registrationVerificationIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the registration verification Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.registrationVerificationIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a registration verification Id is no longer valid and cannot be used by the Verify Registration API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.setupPasswordIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the setup password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.setupPasswordIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the setup password Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.setupPasswordIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a setup password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.twoFactorIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a two factor Id is no longer valid and cannot be used by the Two Factor Login API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.twoFactorTrustIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until an issued Two Factor trust Id is no longer valid and the User will be required to complete Two Factor authentication during the next authentication attempt. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.actionDuration [Long] Available Since 1.8.0

The duration of the User Action. This value along with the actionDurationUnit will be used to set the duration of the User Action. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.actionDurationUnit [String] Available Since 1.8.0

The unit of time associated with a duration. The possible values are:

  • MINUTES

  • HOURS

  • DAYS

  • WEEKS

  • MONTHS

  • YEARS

tenant.failedAuthenticationConfiguration.resetCountInSeconds [Integer] Available Since 1.8.0

The length of time in seconds before the failed authentication count will be reset. Value must be greater than 0.

For example, if tooManyAttempts is set to 5 and you fail to authenticate 4 times in a row, waiting for the duration specified here will cause your fifth attempt to start back at 1.

tenant.failedAuthenticationConfiguration.tooManyAttempts [Integer] Available Since 1.8.0

The number of failed attempts considered to be too many. Once this threshold is reached the specified User Action will be applied to the user for the duration specified. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.userActionId [UUID] Available Since 1.8.0

The Id of the User Action that is applied when the threshold is reached for too many failed authentication attempts.

tenant.familyConfiguration.allowChildRegistrations [Boolean] Available Since 1.8.0

Whether to allow child registrations.

tenant.familyConfiguration.confirmChildEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use when confirming a child.

tenant.familyConfiguration.deleteOrphanedAccounts [Boolean] Available Since 1.8.0

Whether to delete accounts that have been orphaned.

tenant.familyConfiguration.deleteOrphanedAccountsDays [Integer] Available Since 1.8.0

The number of days after an account has been orphaned before it is deleted. Value must be greater than 0.

tenant.familyConfiguration.enabled [Boolean] Available Since 1.8.0

Whether family configuration is enabled.

tenant.familyConfiguration.familyRequestEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use when a family request is made.

tenant.familyConfiguration.maximumChildAge [Integer] Available Since 1.8.0

The maximum age of a child. Value must be greater than 0.

tenant.familyConfiguration.minimumOwnerAge [Integer] Available Since 1.8.0

The minimum age to be an owner. Value must be greater than 0.

tenant.familyConfiguration.parentEmailRequired [Boolean] Available Since 1.8.0

Whether a parent email is required.

tenant.familyConfiguration.parentRegistrationEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use for parent registration.

tenant.httpSessionMaxInactiveInterval [Integer] Available Since 1.8.0

Time in seconds until an inactive session will be invalidated. Used when creating a new session in the FusionAuth OAuth frontend.

tenant.id [UUID]

The unique identifier for this Tenant.

tenant.issuer [String] Available Since 1.8.0

The named issuer used to sign tokens, this is generally your public fully qualified domain.

tenant.jwtConfiguration.accessTokenKeyId [UUID] Available Since 1.8.0

The unique id of the signing key used to sign the access token.

tenant.jwtConfiguration.idTokenKeyId [UUID] Available Since 1.8.0

The unique id of the signing key used to sign the Id token.

tenant.jwtConfiguration.refreshTokenTimeToLiveInMinutes [Integer] Available Since 1.8.0

The length of time in minutes a Refresh Token is valid from the time it was issued. Value must be greater than 0.

tenant.jwtConfiguration.timeToLiveInSeconds [Integer] Available Since 1.8.0

The length of time in seconds this JWT is valid from the time it was issued. Value must be greater than 0.

tenant.logoutURL [String] Available Since 1.8.0

The logout redirect URL when sending the user’s browser to the /oauth2/logout URI of the FusionAuth Front End. This value is only used when a logout URL is not defined in your Application.

tenant.maximumPasswordAge.days [Integer] Available Since 1.8.0

The password maximum age in days. The number of days after which FusionAuth will require a user to change their password. Required when systemConfiguration.maximumPasswordAge.enabled is set to true.

tenant.maximumPasswordAge.enabled [Boolean] Available Since 1.8.0

Indicates that the maximum password age is enabled and being enforced.

tenant.minimumPasswordAge.seconds [Integer] Available Since 1.8.0

The password minimum age in seconds. When enabled FusionAuth will not allow a password to be changed until it reaches this minimum age. Required when systemConfiguration.minimumPasswordAge.enabled is set to true.

tenant.minimumPasswordAge.enabled [Boolean] Available Since 1.8.0

Indicates that the minimum password age is enabled and being enforced.

tenant.name [String]

The unique name of the Tenant.

tenant.passwordEncryptionConfiguration.encryptionScheme [String] Available Since 1.8.0

The default method for encrypting the User’s password. The following encryptors are provided with FusionAuth:

tenant.passwordEncryptionConfiguration.encryptionSchemeFactor [Integer] Available Since 1.8.0

The factor used by the password encryption scheme. If not provided, the PasswordEncryptor provides a default value. Generally this will be used as an iteration count to generate the hash. The actual use of this value is up to the PasswordEncryptor implementation.

tenant.passwordEncryptionConfiguration.modifyEncryptionSchemeOnLogin [Boolean] Available Since 1.8.0

When enabled a user’s hash configuration will be modified to match these configured settings. This can be useful to increase a password hash strength over time or upgrade imported users to a more secure encryption scheme after an initial import.

tenant.passwordValidationRules.maxLength [Integer] Available Since 1.8.0

The maximum length of a password when a new user is created or a user requests a password change.

tenant.passwordValidationRules.minLength [Integer] Available Since 1.8.0

The minimum length of a password when a new user is created or a user requests a password change.

tenant.passwordValidationRules.rememberPreviousPasswords.count [Integer] Available Since 1.8.0

The number of previous passwords to remember. Value must be greater than 0.

tenant.passwordValidationRules.rememberPreviousPasswords.enabled [Boolean] Available Since 1.8.0

Whether to prevent a user from using any of their previous passwords.

tenant.passwordValidationRules.requiredMixedCase [Boolean] Available Since 1.8.0

Whether to force the user to use at least one uppercase and one lowercase character.

tenant.passwordValidationRules.requireNonAlpha [Boolean] Available Since 1.8.0

Whether to force the user to use at least one non-alphanumeric character.

tenant.passwordValidationRules.requireNumber [Boolean] Available Since 1.8.0

Whether to force the user to use at least one number.

tenant.themeId [UUID] Available Since 1.8.0

The unique Id of the theme to be used to style the login page and other end user templates.

Example Response JSON
{
  "tenant": {
    "data": {
      "description": "No more secrets, Marty."
    },
    "emailConfiguration": {
      "forgotPasswordEmailTemplateId": "49aba1de-0225-45d7-a2b1-f9fe46b0242c",
      "host": "smtp.sendgrid.net",
      "password": "password",
      "passwordlessEmailTemplateId": "a917e23a-da58-4cda-be01-90f542f8c343",
      "port": 587,
      "properties": {
        "key": "value"
      },
      "security": "TLS",
      "setPasswordEmailTemplateId": "a9aba13e-0125-4fd7-a2b1-aaa146b02423",
      "username": "username",
      "verificationEmailTemplateId": "8da42c09-461c-45f3-b931-6e9f63b87ab5",
      "verifyEmail": true,
      "verifyEmailWhenChanged": true
    },
    "eventConfiguration": {
      "events": {
        "user.delete": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.deactivate": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.bulk.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.reactivate": {
          "enabled": true,
          "transactionType": "None"
        },
        "jwt.refresh-token.revoke": {
          "enabled": true,
          "transactionType": "None"
        },
        "jwt.public-key.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.login.success": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.login.failed": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.delete": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.verified": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.email.verified": {
          "enabled": true,
          "transactionType": "None"
        }
      }
    },
    "externalIdentifierConfiguration": {
      "authorizationGrantIdTimeToLiveInSeconds": 30,
      "changePasswordIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "changePasswordIdTimeToLiveInSeconds": 600,
      "emailVerificationIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "emailVerificationIdTimeToLiveInSeconds": 86400,
      "oneTimePasswordTimeToLiveInSeconds": 60,
      "passwordlessLoginGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "passwordlessLoginTimeToLiveInSeconds": 180,
      "registrationVerificationIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "registrationVerificationIdTimeToLiveInSeconds": 86400,
      "setupPasswordIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "setupPasswordIdTimeToLiveInSeconds": 86400,
      "twoFactorIdTimeToLiveInSeconds": 300,
      "twoFactorTrustIdTimeToLiveInSeconds": 2592000
    },
    "failedAuthenticationConfiguration": {
      "actionDuration": 3,
      "actionDurationUnit": "MINUTES",
      "resetCountInSeconds": 60,
      "tooManyAttempts": 5,
      "userActionId": "16cfc707-268c-4c5b-8989-f71f3ee156d4"
    },
    "familyConfiguration": {
      "allowChildRegistrations": true,
      "confirmChildEmailTemplateId": "87654321-4321-8765-ba09-ba0987654321",
      "deleteOrphanedAccounts": false,
      "deleteOrphanedAccountsDays": 30,
      "enabled": true,
      "familyRequestEmailTemplateId": "57462514-a73b-cd76-0001-b8a65cd61230",
      "maximumChildAge": 12,
      "minimumOwnerAge": 21,
      "parentEmailRequired": false,
      "parentRegistrationEmailTemplateId": "12345678-1234-5678-90ab-1234567890ab"
    },
    "httpSessionMaxInactiveInterval": 3600,
    "id": "32306536-3036-6431-3865-646430303332",
    "issuer": "https://example.com",
    "jwtConfiguration": {
      "accessTokenKeyId": "025233ca-d4f3-2aa4-eca9-7e4200e9b472",
      "enabled": true,
      "idTokenKeyId": "092dbedc-30af-4149-9c61-b578f2c72f59",
      "refreshTokenTimeToLiveInMinutes": 43200,
      "timeToLiveInSeconds": 3600
    },
    "logoutURL": "http://example.com/logout",
    "maximumPasswordAge": {
      "days": 180,
      "enabled": false
    },
    "minimumPasswordAge": {
      "enabled": false,
      "seconds": 30
    },
    "name": "Playtronics Co.",
    "passwordEncryptionConfiguration": {
      "encryptionScheme": "salted-pbkdf2-hmac-sha256",
      "encryptionSchemeFactor": 24000,
      "modifyEncryptionSchemeOnLogin": false
    },
    "passwordValidationRules": {
      "maxLength": 256,
      "minLength": 8,
      "rememberPreviousPasswords": {
        "count": 2,
        "enabled": true
      },
      "requireMixedCase": true,
      "requireNonAlpha": true,
      "requireNumber": true
    },
    "themeId": "c6ad3fac-6f32-4db7-91a4-061ff035e871"
  }
}
Table 8. Response Body for all Tenants

tenants [Array]

The list of Tenant objects.

tenants[x].data [Object]

An object that can hold any information about the Tenant that should be persisted.

tenants[x].emailConfiguration.enabled [Boolean] Deprecated

When this value is set to true the email configuration provided by this tenant will take precedence over the configuration by the System Configuration.

  Removed in version 1.8.0 In version 1.8.0 and beyond, a Tenant’s email configuration is enabled upon configuration.

tenants[x].emailConfiguration.forgotPasswordEmailTemplateId [UUID]

The Id of the Email Template that is used when a user is sent a forgot password email.

tenants[x].emailConfiguration.host [String] Available Since 1.8.0

The host name of the SMTP server that FusionAuth will use.

tenants[x].emailConfiguration.password [String] Available Since 1.8.0

An optional password FusionAuth will use to authenticate with the SMTP server.

tenants[x].emailConfiguration.passwordlessEmailTemplateId [UUID] Available Since 1.8.0

The Id of the Passwordless Email Template.

tenants[x].emailConfiguration.port [Integer] Available Since 1.8.0

The port of the SMTP server that FusionAuth will use.

tenants[x].emailConfiguration.properties [String] Available Since 1.8.0

Additional Email Configuration in a properties file formatted String.

tenants[x].emailConfiguration.security String Available Since 1.8.0

The type of security protocol FusionAuth will use when connecting to the SMTP server. The possible values are:

  • NONE - no security will be used. All communications will be sent plaintext.

  • SSL - SSL will be used to connect to the SMTP server. This protocol is not recommended unless it is the only one your SMTP server supports.

  • TLS - TLS will be used to connect to the SMTP server. This is the preferred protocol for all SMTP servers.

tenants[x].emailConfiguration.setPasswordEmailTemplateId [UUID]

The Id of the Email Template that is used when a user had their account created for them and they must set their password manually and they are sent an email to set their password.

tenants[x].emailConfiguration.username [String] Available Since 1.8.0

An optional username FusionAuth will to authenticate with the SMTP server.

tenants[x].emailConfiguration.verificationEmailTemplateId [UUID]

The If of the Email Template that is used to send the verification emails to users. These emails are used to verify that a user’s email address is valid. If either the verifyEmail or verifyEmailWhenChanged fields are true this field is required.

tenants[x].emailConfiguration.verifyEmail [Boolean]

Whether the user’s email addresses are verified when the registers with your application.

tenants[x].emailConfiguration.verifyEmailWhenChanged [Boolean]

Whether the user’s email addresses are verified when the user changes them.

tenants[x].eventConfiguration.events [Object] Available Since 1.8.0

A mapping of the configuration for each event type that FusionAuth sends. The event types that are the keys into this Object are:

  • user.action - When a user action is triggered

  • user.bulk.create - When multiple users are created in bulk (i.e. during an import)

  • user.create - When a user is created

  • user.email.verified - When a user verifies their email address

  • user.update - When a user is updated

  • user.deactivate - When a user is deactivated

  • user.reactivate - When a user is reactivated

  • user.login.success - When a user completes a login request

  • user.login.failed - When a user fails a login request

  • user.registration.create - When a user registration is created

  • user.registration.update - When a user registration is updated

  • user.registration.delete - When a user registration is deleted

  • user.registration.verified - When a user completes registration verification

  • user.delete - When a user is deleted

  • jwt.public-key.update - When a JWT RSA Public / Private keypair may have been changed

  • jwt.refresh-token.revoke - When a JWT Refresh Token is revoked

tenants[x].eventConfiguration.events[type].enabled [Boolean] Available Since 1.8.0

Whether or not FusionAuth should send these types of events to any configured Webhooks.

tenants[x].eventConfiguration.events[type].transactionType String Available Since 1.8.0

The transaction type that FusionAuth uses when sending these types of events to any configured Webhooks. The transaction types are:

  • None - No Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • Any - Only a single Webhook is required to succeed for the FusionAuth transaction to be committed.

  • SimpleMajority - A simple majority (50% or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • SuperMajority - A super majority (2/3 or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • AbsoluteMajority - Every Webhook must succeed for the FusionAuth transaction to be committed.

tenants[x].externalIdentifierConfiguration.authorizationGrantIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a OAuth authorization code in no longer valid to be exchanged for an access token. This is essentially the time allowed between the start of an Authorization request during the Authorization code grant and when you request an access token using this authorization code on the Token endpoint.

Value must be greater than 0 and less than or equal to 600.

tenants[x].externalIdentifierConfiguration.changePasswordIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the change password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenants[x].externalIdentifierConfiguration.changePasswordIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the change password Id. Must be either randomBytes or randomDigits.

tenants[x].externalIdentifierConfiguration.changePasswordIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a change password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenants[x].externalIdentifierConfiguration.emailVerificationIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the email verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenants[x].externalIdentifierConfiguration.emailVerificationIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the email verification Id. Must be either randomBytes or randomDigits.

tenants[x].externalIdentifierConfiguration.emailVerificationIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a email verification Id is no longer valid and cannot be used by the Verify Email API. Value must be greater than 0.

tenants[x].externalIdentifierConfiguration.oneTimePasswordTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a One Time Password is no longer valid and cannot be used by the Login API. Value must be greater than 0.

tenants[x].externalIdentifierConfiguration.passwordlessLoginGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the passwordless login.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenants[x].externalIdentifierConfiguration.passwordlessLoginGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the passwordless login. Must be either randomBytes or randomDigits.

tenants[x].externalIdentifierConfiguration.passwordlessLoginTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a passwordless code is no longer valid and cannot be used by the Passwordless API. Value must be greater than 0.

tenants[x].externalIdentifierConfiguration.registrationVerificationIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the registration verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenants[x].externalIdentifierConfiguration.registrationVerificationIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the registration verification Id. Must be either randomBytes or randomDigits.

tenants[x].externalIdentifierConfiguration.registrationVerificationIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a registration verification Id is no longer valid and cannot be used by the Verify Registration API. Value must be greater than 0.

tenants[x].externalIdentifierConfiguration.setupPasswordIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the setup password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenants[x].externalIdentifierConfiguration.setupPasswordIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the setup password Id. Must be either randomBytes or randomDigits.

tenants[x].externalIdentifierConfiguration.setupPasswordIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a setup password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenants[x].externalIdentifierConfiguration.twoFactorIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a two factor Id is no longer valid and cannot be used by the Two Factor Login API. Value must be greater than 0.

tenants[x].externalIdentifierConfiguration.twoFactorTrustIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until an issued Two Factor trust Id is no longer valid and the User will be required to complete Two Factor authentication during the next authentication attempt. Value must be greater than 0.

tenants[x].failedAuthenticationConfiguration.actionDuration [Long] Available Since 1.8.0

The duration of the User Action. This value along with the actionDurationUnit will be used to set the duration of the User Action. Value must be greater than 0.

tenants[x].failedAuthenticationConfiguration.actionDurationUnit [String] Available Since 1.8.0

The unit of time associated with a duration. The possible values are:

  • MINUTES

  • HOURS

  • DAYS

  • WEEKS

  • MONTHS

  • YEARS

tenants[x].failedAuthenticationConfiguration.resetCountInSeconds [Integer] Available Since 1.8.0

The length of time in seconds before the failed authentication count will be reset. Value must be greater than 0.

For example, if tooManyAttempts is set to 5 and you fail to authenticate 4 times in a row, waiting for the duration specified here will cause your fifth attempt to start back at 1.

tenants[x].failedAuthenticationConfiguration.tooManyAttempts [Integer] Available Since 1.8.0

The number of failed attempts considered to be too many. Once this threshold is reached the specified User Action will be applied to the user for the duration specified. Value must be greater than 0.

tenants[x].failedAuthenticationConfiguration.userActionId [UUID] Available Since 1.8.0

The Id of the User Action that is applied when the threshold is reached for too many failed authentication attempts.

tenants[x].familyConfiguration.allowChildRegistrations [Boolean] Available Since 1.8.0

Whether to allow child registrations.

tenants[x].familyConfiguration.confirmChildEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use when confirming a child.

tenants[x].familyConfiguration.deleteOrphanedAccounts [Boolean] Available Since 1.8.0

Whether to delete accounts that have been orphaned.

tenants[x].familyConfiguration.deleteOrphanedAccountsDays [Integer] Available Since 1.8.0

The number of days after an account has been orphaned before it is deleted. Value must be greater than 0.

tenants[x].familyConfiguration.enabled [Boolean] Available Since 1.8.0

Whether family configuration is enabled.

tenants[x].familyConfiguration.familyRequestEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use when a family request is made.

tenants[x].familyConfiguration.maximumChildAge [Integer] Available Since 1.8.0

The maximum age of a child. Value must be greater than 0.

tenants[x].familyConfiguration.minimumOwnerAge [Integer] Available Since 1.8.0

The minimum age to be an owner. Value must be greater than 0.

tenants[x].familyConfiguration.parentEmailRequired [Boolean] Available Since 1.8.0

Whether a parent email is required.

tenants[x].familyConfiguration.parentRegistrationEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use for parent registration.

tenants[x].httpSessionMaxInactiveInterval [Integer] Available Since 1.8.0

Time in seconds until an inactive session will be invalidated. Used when creating a new session in the FusionAuth OAuth frontend.

tenants[x].id [UUID]

The unique identifier for this Tenant.

tenants[x].issuer [String] Available Since 1.8.0

The named issuer used to sign tokens, this is generally your public fully qualified domain.

tenants[x].jwtConfiguration.accessTokenKeyId [UUID] Available Since 1.8.0

The unique id of the signing key used to sign the access token.

tenants[x].jwtConfiguration.idTokenKeyId [UUID] Available Since 1.8.0

The unique id of the signing key used to sign the Id token.

tenants[x].jwtConfiguration.refreshTokenTimeToLiveInMinutes [Integer] Available Since 1.8.0

The length of time in minutes a Refresh Token is valid from the time it was issued. Value must be greater than 0.

tenants[x].jwtConfiguration.timeToLiveInSeconds [Integer] Available Since 1.8.0

The length of time in seconds this JWT is valid from the time it was issued. Value must be greater than 0.

tenants[x].logoutURL [String] Available Since 1.8.0

The logout redirect URL when sending the user’s browser to the /oauth2/logout URI of the FusionAuth Front End. This value is only used when a logout URL is not defined in your Application.

tenants[x].maximumPasswordAge.days [Integer] Available Since 1.8.0

The password maximum age in days. The number of days after which FusionAuth will require a user to change their password. Required when systemConfiguration.maximumPasswordAge.enabled is set to true.

tenants[x].maximumPasswordAge.enabled [Boolean] Available Since 1.8.0

Indicates that the maximum password age is enabled and being enforced.

tenants[x].minimumPasswordAge.seconds [Integer] Available Since 1.8.0

The password minimum age in seconds. When enabled FusionAuth will not allow a password to be changed until it reaches this minimum age. Required when systemConfiguration.minimumPasswordAge.enabled is set to true.

tenants[x].minimumPasswordAge.enabled [Boolean] Available Since 1.8.0

Indicates that the minimum password age is enabled and being enforced.

tenants[x].name [String]

The unique name of the Tenant.

tenants[x].passwordEncryptionConfiguration.encryptionScheme [String] Available Since 1.8.0

The default method for encrypting the User’s password. The following encryptors are provided with FusionAuth:

tenants[x].passwordEncryptionConfiguration.encryptionSchemeFactor [Integer] Available Since 1.8.0

The factor used by the password encryption scheme. If not provided, the PasswordEncryptor provides a default value. Generally this will be used as an iteration count to generate the hash. The actual use of this value is up to the PasswordEncryptor implementation.

tenants[x].passwordEncryptionConfiguration.modifyEncryptionSchemeOnLogin [Boolean] Available Since 1.8.0

When enabled a user’s hash configuration will be modified to match these configured settings. This can be useful to increase a password hash strength over time or upgrade imported users to a more secure encryption scheme after an initial import.

tenants[x].passwordValidationRules.maxLength [Integer] Available Since 1.8.0

The maximum length of a password when a new user is created or a user requests a password change.

tenants[x].passwordValidationRules.minLength [Integer] Available Since 1.8.0

The minimum length of a password when a new user is created or a user requests a password change.

tenants[x].passwordValidationRules.rememberPreviousPasswords.count [Integer] Available Since 1.8.0

The number of previous passwords to remember. Value must be greater than 0.

tenants[x].passwordValidationRules.rememberPreviousPasswords.enabled [Boolean] Available Since 1.8.0

Whether to prevent a user from using any of their previous passwords.

tenants[x].passwordValidationRules.requiredMixedCase [Boolean] Available Since 1.8.0

Whether to force the user to use at least one uppercase and one lowercase character.

tenants[x].passwordValidationRules.requireNonAlpha [Boolean] Available Since 1.8.0

Whether to force the user to use at least one non-alphanumeric character.

tenants[x].passwordValidationRules.requireNumber [Boolean] Available Since 1.8.0

Whether to force the user to use at least one number.

tenants[x].themeId [UUID] Available Since 1.8.0

The unique Id of the theme to be used to style the login page and other end user templates.

Example Response JSON
{
  "tenants": [
    {
      "data": {
        "description": "No more secrets, Marty."
      },
      "emailConfiguration": {
        "forgotPasswordEmailTemplateId": "49aba1de-0225-45d7-a2b1-f9fe46b0242c",
        "host": "smtp.sendgrid.net",
        "password": "password",
        "passwordlessEmailTemplateId": "a917e23a-da58-4cda-be01-90f542f8c343",
        "port": 587,
        "properties": {
          "key": "value"
        },
        "security": "TLS",
        "setPasswordEmailTemplateId": "a9aba13e-0125-4fd7-a2b1-aaa146b02423",
        "username": "username",
        "verificationEmailTemplateId": "8da42c09-461c-45f3-b931-6e9f63b87ab5",
        "verifyEmail": true,
        "verifyEmailWhenChanged": true
      },
      "eventConfiguration": {
        "events": {
          "user.delete": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.create": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.update": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.deactivate": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.bulk.create": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.reactivate": {
            "enabled": true,
            "transactionType": "None"
          },
          "jwt.refresh-token.revoke": {
            "enabled": true,
            "transactionType": "None"
          },
          "jwt.public-key.update": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.login.success": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.login.failed": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.registration.create": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.registration.update": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.registration.delete": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.registration.verified": {
            "enabled": true,
            "transactionType": "None"
          },
          "user.email.verified": {
            "enabled": true,
            "transactionType": "None"
          }
        }
      },
      "externalIdentifierConfiguration": {
        "authorizationGrantIdTimeToLiveInSeconds": 30,
        "changePasswordIdGenerator": {
          "length": 32,
          "type": "randomBytes"
        },
        "changePasswordIdTimeToLiveInSeconds": 600,
        "emailVerificationIdGenerator": {
          "length": 32,
          "type": "randomBytes"
        },
        "emailVerificationIdTimeToLiveInSeconds": 86400,
        "oneTimePasswordTimeToLiveInSeconds": 60,
        "passwordlessLoginGenerator": {
          "length": 32,
          "type": "randomBytes"
        },
        "passwordlessLoginTimeToLiveInSeconds": 180,
        "registrationVerificationIdGenerator": {
          "length": 32,
          "type": "randomBytes"
        },
        "registrationVerificationIdTimeToLiveInSeconds": 86400,
        "setupPasswordIdGenerator": {
          "length": 32,
          "type": "randomBytes"
        },
        "setupPasswordIdTimeToLiveInSeconds": 86400,
        "twoFactorIdTimeToLiveInSeconds": 300,
        "twoFactorTrustIdTimeToLiveInSeconds": 2592000
      },
      "failedAuthenticationConfiguration": {
        "actionDuration": 3,
        "actionDurationUnit": "MINUTES",
        "resetCountInSeconds": 60,
        "tooManyAttempts": 5,
        "userActionId": "16cfc707-268c-4c5b-8989-f71f3ee156d4"
      },
      "familyConfiguration": {
        "allowChildRegistrations": true,
        "confirmChildEmailTemplateId": "87654321-4321-8765-ba09-ba0987654321",
        "deleteOrphanedAccounts": false,
        "deleteOrphanedAccountsDays": 30,
        "enabled": true,
        "familyRequestEmailTemplateId": "57462514-a73b-cd76-0001-b8a65cd61230",
        "maximumChildAge": 12,
        "minimumOwnerAge": 21,
        "parentEmailRequired": false,
        "parentRegistrationEmailTemplateId": "12345678-1234-5678-90ab-1234567890ab"
      },
      "httpSessionMaxInactiveInterval": 3600,
      "id": "32306536-3036-6431-3865-646430303332",
      "issuer": "https://example.com",
      "jwtConfiguration": {
        "accessTokenKeyId": "025233ca-d4f3-2aa4-eca9-7e4200e9b472",
        "enabled": true,
        "idTokenKeyId": "092dbedc-30af-4149-9c61-b578f2c72f59",
        "refreshTokenTimeToLiveInMinutes": 43200,
        "timeToLiveInSeconds": 3600
      },
      "logoutURL": "http://example.com/logout",
      "maximumPasswordAge": {
        "days": 180,
        "enabled": false
      },
      "minimumPasswordAge": {
        "enabled": false,
        "seconds": 30
      },
      "name": "Playtronics Co.",
      "passwordEncryptionConfiguration": {
        "encryptionScheme": "salted-pbkdf2-hmac-sha256",
        "encryptionSchemeFactor": 24000,
        "modifyEncryptionSchemeOnLogin": false
      },
      "passwordValidationRules": {
        "maxLength": 256,
        "minLength": 8,
        "rememberPreviousPasswords": {
          "count": 2,
          "enabled": true
        },
        "requireMixedCase": true,
        "requireNonAlpha": true,
        "requireNumber": true
      },
      "themeId": "c6ad3fac-6f32-4db7-91a4-061ff035e871"
    }
  ]
}

4. Update a Tenant

This API is used to update an existing Tenant. You must specify the Id of the Tenant you are updating on the URI. You must specify all of the properties of the Tenant when calling this API. This API does not merge the existing Tenant and your new data. It replaces the existing Tenant with your new data.

4.1. Request

Update the Tenant with the given Id

URI

PUT /api/tenant/{tenantId}

Table 9. Request Parameters

tenantId [UUID] Required

The Id of the Tenant to update.

Table 10. Request Body

tenant.data [Object] Optional

An object that can hold any information about the Tenant that should be persisted.

tenant.emailConfiguration.enabled [Boolean] Optional Deprecated

When this value is set to true the email configuration provided by this tenant will take precedence over the configuration by the System Configuration.

  Removed in version 1.8.0 In version 1.8.0 and beyond, a Tenant’s email configuration is enabled upon configuration.

tenant.emailConfiguration.forgotPasswordEmailTemplateId [UUID] Optional

The Id of the Email Template that is used when a user is sent a forgot password email.

tenant.emailConfiguration.host [String] Required Available Since 1.8.0

The host name of the SMTP server that FusionAuth will use.

tenant.emailConfiguration.password [String] Optional Available Since 1.8.0

An optional password FusionAuth will use to authenticate with the SMTP server.

tenant.emailConfiguration.passwordlessEmailTemplateId [UUID] Optional Available Since 1.8.0

The Id of the Passwordless Email Template.

tenant.emailConfiguration.port [Integer] Required Available Since 1.8.0

The port of the SMTP server that FusionAuth will use.

tenant.emailConfiguration.properties [String] Optional Available Since 1.8.0

Additional Email Configuration in a properties file formatted String.

tenant.emailConfiguration.security String Optional defaults to NONE Available Since 1.8.0

The type of security protocol FusionAuth will use when connecting to the SMTP server. The possible values are:

  • NONE - no security will be used. All communications will be sent plaintext.

  • SSL - SSL will be used to connect to the SMTP server. This protocol is not recommended unless it is the only one your SMTP server supports.

  • TLS - TLS will be used to connect to the SMTP server. This is the preferred protocol for all SMTP servers.

tenant.emailConfiguration.setPasswordEmailTemplateId [UUID] Optional

The Id of the Email Template that is used when a user had their account created for them and they must set their password manually and they are sent an email to set their password.

tenant.emailConfiguration.username [String] Optional Available Since 1.8.0

An optional username FusionAuth will to authenticate with the SMTP server.

tenant.emailConfiguration.verificationEmailTemplateId [UUID] Optional

The If of the Email Template that is used to send the verification emails to users. These emails are used to verify that a user’s email address is valid. If either the verifyEmail or verifyEmailWhenChanged fields are true this field is required.

tenant.emailConfiguration.verifyEmail [Boolean] Optional defaults to false

Whether the user’s email addresses are verified when the registers with your application.

tenant.emailConfiguration.verifyEmailWhenChanged [Boolean] Optional defaults to false

Whether the user’s email addresses are verified when the user changes them.

tenant.eventConfiguration.events [Object] Optional defaults to {} Available Since 1.8.0

A mapping of the configuration for each event type that FusionAuth sends. The event types that are the keys into this Object are:

  • user.action - When a user action is triggered

  • user.bulk.create - When multiple users are created in bulk (i.e. during an import)

  • user.create - When a user is created

  • user.email.verified - When a user verifies their email address

  • user.update - When a user is updated

  • user.deactivate - When a user is deactivated

  • user.reactivate - When a user is reactivated

  • user.login.success - When a user completes a login request

  • user.login.failed - When a user fails a login request

  • user.registration.create - When a user registration is created

  • user.registration.update - When a user registration is updated

  • user.registration.delete - When a user registration is deleted

  • user.registration.verified - When a user completes registration verification

  • user.delete - When a user is deleted

  • jwt.public-key.update - When a JWT RSA Public / Private keypair may have been changed

  • jwt.refresh-token.revoke - When a JWT Refresh Token is revoked

tenant.eventConfiguration.events[type].enabled [Boolean] Optional defaults to false Available Since 1.8.0

Whether or not FusionAuth should send these types of events to any configured Webhooks.

tenant.eventConfiguration.events[type].transactionType String Optional Available Since 1.8.0

The transaction type that FusionAuth uses when sending these types of events to any configured Webhooks. The transaction types are:

  • None - No Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • Any - Only a single Webhook is required to succeed for the FusionAuth transaction to be committed.

  • SimpleMajority - A simple majority (50% or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • SuperMajority - A super majority (2/3 or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • AbsoluteMajority - Every Webhook must succeed for the FusionAuth transaction to be committed.

tenant.externalIdentifierConfiguration.authorizationGrantIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a OAuth authorization code in no longer valid to be exchanged for an access token. This is essentially the time allowed between the start of an Authorization request during the Authorization code grant and when you request an access token using this authorization code on the Token endpoint.

Value must be greater than 0 and less than or equal to 600.

tenant.externalIdentifierConfiguration.changePasswordIdGenerator.length [Integer] Required Available Since 1.8.0

The length of the secure generator used for generating the change password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.changePasswordIdGenerator.type [String] Required Available Since 1.8.0

The type of the secure generator used for generating the change password Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.changePasswordIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a change password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.emailVerificationIdGenerator.length [Integer] Required Available Since 1.8.0

The length of the secure generator used for generating the email verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.emailVerificationIdGenerator.type [String] Required Available Since 1.8.0

The type of the secure generator used for generating the email verification Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.emailVerificationIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a email verification Id is no longer valid and cannot be used by the Verify Email API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.oneTimePasswordTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a One Time Password is no longer valid and cannot be used by the Login API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.passwordlessLoginGenerator.length [Integer] Required Available Since 1.8.0

The length of the secure generator used for generating the passwordless login.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.passwordlessLoginGenerator.type [String] Required Available Since 1.8.0

The type of the secure generator used for generating the passwordless login. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.passwordlessLoginTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a passwordless code is no longer valid and cannot be used by the Passwordless API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.registrationVerificationIdGenerator.length [Integer] Required Available Since 1.8.0

The length of the secure generator used for generating the registration verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.registrationVerificationIdGenerator.type [String] Required Available Since 1.8.0

The type of the secure generator used for generating the registration verification Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.registrationVerificationIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a registration verification Id is no longer valid and cannot be used by the Verify Registration API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.setupPasswordIdGenerator.length [Integer] Required Available Since 1.8.0

The length of the secure generator used for generating the setup password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.setupPasswordIdGenerator.type [String] Required Available Since 1.8.0

The type of the secure generator used for generating the setup password Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.setupPasswordIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a setup password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.twoFactorIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until a two factor Id is no longer valid and cannot be used by the Two Factor Login API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.twoFactorTrustIdTimeToLiveInSeconds [Integer] Required Available Since 1.8.0

The time in seconds until an issued Two Factor trust Id is no longer valid and the User will be required to complete Two Factor authentication during the next authentication attempt. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.actionDuration [Long] Required defaults to 3 Available Since 1.8.0

The duration of the User Action. This value along with the actionDurationUnit will be used to set the duration of the User Action. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.actionDurationUnit [String] Required defaults to "MINUTES" Available Since 1.8.0

The unit of time associated with a duration. The possible values are:

  • MINUTES

  • HOURS

  • DAYS

  • WEEKS

  • MONTHS

  • YEARS

tenant.failedAuthenticationConfiguration.resetCountInSeconds [Integer] Required defaults to 60 Available Since 1.8.0

The length of time in seconds before the failed authentication count will be reset. Value must be greater than 0.

For example, if tooManyAttempts is set to 5 and you fail to authenticate 4 times in a row, waiting for the duration specified here will cause your fifth attempt to start back at 1.

tenant.failedAuthenticationConfiguration.tooManyAttempts [Integer] Required defaults to 5 Available Since 1.8.0

The number of failed attempts considered to be too many. Once this threshold is reached the specified User Action will be applied to the user for the duration specified. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.userActionId [UUID] Optional Available Since 1.8.0

The Id of the User Action that is applied when the threshold is reached for too many failed authentication attempts.

tenant.familyConfiguration.allowChildRegistrations [Boolean] Optional defaults to true Available Since 1.8.0

Whether to allow child registrations.

tenant.familyConfiguration.confirmChildEmailTemplateId [UUID] Optional Available Since 1.8.0

The unique Id of the email template to use when confirming a child.

tenant.familyConfiguration.deleteOrphanedAccounts [Boolean] Optional defaults to false Available Since 1.8.0

Whether to delete accounts that have been orphaned.

tenant.familyConfiguration.deleteOrphanedAccountsDays [Integer] Optional defaults to 30 Available Since 1.8.0

The number of days after an account has been orphaned before it is deleted. Value must be greater than 0.

tenant.familyConfiguration.enabled [Boolean] Optional defaults to false Available Since 1.8.0

Whether family configuration is enabled.

tenant.familyConfiguration.familyRequestEmailTemplateId [UUID] Optional Available Since 1.8.0

The unique Id of the email template to use when a family request is made.

tenant.familyConfiguration.maximumChildAge [Integer] Optional defaults to 12 Available Since 1.8.0

The maximum age of a child. Value must be greater than 0.

tenant.familyConfiguration.minimumOwnerAge [Integer] Optional defaults to 21 Available Since 1.8.0

The minimum age to be an owner. Value must be greater than 0.

tenant.familyConfiguration.parentEmailRequired [Boolean] Optional defaults to false Available Since 1.8.0

Whether a parent email is required.

tenant.familyConfiguration.parentRegistrationEmailTemplateId [UUID] Optional Available Since 1.8.0

The unique Id of the email template to use for parent registration.

tenant.httpSessionMaxInactiveInterval [Integer] Optional default is 3600 Available Since 1.8.0

Time in seconds until an inactive session will be invalidated. Used when creating a new session in the FusionAuth OAuth frontend.

tenant.issuer [String] Required Available Since 1.8.0

The named issuer used to sign tokens, this is generally your public fully qualified domain.

tenant.jwtConfiguration.accessTokenKeyId [UUID] Required Available Since 1.8.0

The unique id of the signing key used to sign the access token.

tenant.jwtConfiguration.idTokenKeyId [UUID] Required Available Since 1.8.0

The unique id of the signing key used to sign the Id token.

tenant.jwtConfiguration.refreshTokenTimeToLiveInMinutes [Integer] Required Available Since 1.8.0

The length of time in minutes a Refresh Token is valid from the time it was issued. Value must be greater than 0.

tenant.jwtConfiguration.timeToLiveInSeconds [Integer] Required Available Since 1.8.0

The length of time in seconds this JWT is valid from the time it was issued. Value must be greater than 0.

tenant.logoutURL [String] Optional Available Since 1.8.0

The logout redirect URL when sending the user’s browser to the /oauth2/logout URI of the FusionAuth Front End. This value is only used when a logout URL is not defined in your Application.

tenant.maximumPasswordAge.days [Integer] Optional defaults to 180 Available Since 1.8.0

The password maximum age in days. The number of days after which FusionAuth will require a user to change their password. Required when systemConfiguration.maximumPasswordAge.enabled is set to true.

tenant.maximumPasswordAge.enabled [Boolean] Optional defaults to false Available Since 1.8.0

Indicates that the maximum password age is enabled and being enforced.

tenant.minimumPasswordAge.seconds [Integer] Optional defaults to 30 Available Since 1.8.0

The password minimum age in seconds. When enabled FusionAuth will not allow a password to be changed until it reaches this minimum age. Required when systemConfiguration.minimumPasswordAge.enabled is set to true.

tenant.minimumPasswordAge.enabled [Boolean] Optional defaults to false Available Since 1.8.0

Indicates that the minimum password age is enabled and being enforced.

tenant.name [String] Required

The unique name of the Tenant.

tenant.passwordEncryptionConfiguration.encryptionScheme [String] Optional defaults to "salted-pbkdf2-hmac-sha256" Available Since 1.8.0

The default method for encrypting the User’s password. The following encryptors are provided with FusionAuth:

tenant.passwordEncryptionConfiguration.encryptionSchemeFactor [Integer] Optional defaults to 24000 Available Since 1.8.0

The factor used by the password encryption scheme. If not provided, the PasswordEncryptor provides a default value. Generally this will be used as an iteration count to generate the hash. The actual use of this value is up to the PasswordEncryptor implementation.

tenant.passwordEncryptionConfiguration.modifyEncryptionSchemeOnLogin [Boolean] Optional defaults to false Available Since 1.8.0

When enabled a user’s hash configuration will be modified to match these configured settings. This can be useful to increase a password hash strength over time or upgrade imported users to a more secure encryption scheme after an initial import.

tenant.passwordValidationRules.maxLength [Integer] Required defaults to 256 Available Since 1.8.0

The maximum length of a password when a new user is created or a user requests a password change.

tenant.passwordValidationRules.minLength [Integer] Required defaults to 8 Available Since 1.8.0

The minimum length of a password when a new user is created or a user requests a password change.

tenant.passwordValidationRules.rememberPreviousPasswords.count [Integer] Optional Available Since 1.8.0

The number of previous passwords to remember. Value must be greater than 0.

tenant.passwordValidationRules.rememberPreviousPasswords.enabled [Boolean] Optional defaults to false Available Since 1.8.0

Whether to prevent a user from using any of their previous passwords.

tenant.passwordValidationRules.requiredMixedCase [Boolean] Optional defaults to false Available Since 1.8.0

Whether to force the user to use at least one uppercase and one lowercase character.

tenant.passwordValidationRules.requireNonAlpha [Boolean] Optional defaults to false Available Since 1.8.0

Whether to force the user to use at least one non-alphanumeric character.

tenant.passwordValidationRules.requireNumber [Boolean] Optional defaults to false Available Since 1.8.0

Whether to force the user to use at least one number.

tenant.themeId [UUID] Required Available Since 1.8.0

The unique Id of the theme to be used to style the login page and other end user templates.

Example Request JSON
{
  "tenant": {
    "data": {
      "description": "No more secrets, Marty."
    },
    "emailConfiguration": {
      "forgotPasswordEmailTemplateId": "49aba1de-0225-45d7-a2b1-f9fe46b0242c",
      "host": "smtp.sendgrid.net",
      "password": "password",
      "passwordlessEmailTemplateId": "a917e23a-da58-4cda-be01-90f542f8c343",
      "port": 587,
      "properties": {
        "key": "value"
      },
      "security": "TLS",
      "setPasswordEmailTemplateId": "a9aba13e-0125-4fd7-a2b1-aaa146b02423",
      "username": "username",
      "verificationEmailTemplateId": "8da42c09-461c-45f3-b931-6e9f63b87ab5",
      "verifyEmail": true,
      "verifyEmailWhenChanged": true
    },
    "eventConfiguration": {
      "events": {
        "user.delete": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.deactivate": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.bulk.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.reactivate": {
          "enabled": true,
          "transactionType": "None"
        },
        "jwt.refresh-token.revoke": {
          "enabled": true,
          "transactionType": "None"
        },
        "jwt.public-key.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.login.success": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.login.failed": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.delete": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.verified": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.email.verified": {
          "enabled": true,
          "transactionType": "None"
        }
      }
    },
    "externalIdentifierConfiguration": {
      "authorizationGrantIdTimeToLiveInSeconds": 30,
      "changePasswordIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "changePasswordIdTimeToLiveInSeconds": 600,
      "emailVerificationIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "emailVerificationIdTimeToLiveInSeconds": 86400,
      "oneTimePasswordTimeToLiveInSeconds": 60,
      "passwordlessLoginGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "passwordlessLoginTimeToLiveInSeconds": 180,
      "registrationVerificationIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "registrationVerificationIdTimeToLiveInSeconds": 86400,
      "setupPasswordIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "setupPasswordIdTimeToLiveInSeconds": 86400,
      "twoFactorIdTimeToLiveInSeconds": 300,
      "twoFactorTrustIdTimeToLiveInSeconds": 2592000
    },
    "failedAuthenticationConfiguration": {
      "actionDuration": 3,
      "actionDurationUnit": "MINUTES",
      "resetCountInSeconds": 60,
      "tooManyAttempts": 5,
      "userActionId": "16cfc707-268c-4c5b-8989-f71f3ee156d4"
    },
    "familyConfiguration": {
      "allowChildRegistrations": true,
      "confirmChildEmailTemplateId": "87654321-4321-8765-ba09-ba0987654321",
      "deleteOrphanedAccounts": false,
      "deleteOrphanedAccountsDays": 30,
      "enabled": true,
      "familyRequestEmailTemplateId": "57462514-a73b-cd76-0001-b8a65cd61230",
      "maximumChildAge": 12,
      "minimumOwnerAge": 21,
      "parentEmailRequired": false,
      "parentRegistrationEmailTemplateId": "12345678-1234-5678-90ab-1234567890ab"
    },
    "httpSessionMaxInactiveInterval": 3600,
    "issuer": "https://example.com",
    "jwtConfiguration": {
      "accessTokenKeyId": "025233ca-d4f3-2aa4-eca9-7e4200e9b472",
      "enabled": true,
      "idTokenKeyId": "092dbedc-30af-4149-9c61-b578f2c72f59",
      "refreshTokenTimeToLiveInMinutes": 43200,
      "timeToLiveInSeconds": 3600
    },
    "logoutURL": "http://example.com/logout",
    "maximumPasswordAge": {
      "days": 180,
      "enabled": false
    },
    "minimumPasswordAge": {
      "enabled": false,
      "seconds": 30
    },
    "name": "Playtronics Co.",
    "passwordEncryptionConfiguration": {
      "encryptionScheme": "salted-pbkdf2-hmac-sha256",
      "encryptionSchemeFactor": 24000,
      "modifyEncryptionSchemeOnLogin": false
    },
    "passwordValidationRules": {
      "maxLength": 256,
      "minLength": 8,
      "rememberPreviousPasswords": {
        "count": 2,
        "enabled": true
      },
      "requireMixedCase": true,
      "requireNonAlpha": true,
      "requireNumber": true
    },
    "themeId": "c6ad3fac-6f32-4db7-91a4-061ff035e871"
  }
}

4.2. Response

The response for this API contains the Tenant that was updated.

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

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 are trying to updated 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.

503

The search index is not available or encountered an exception so the request cannot be completed. The response will contain a JSON body.

Table 12. Response Body for a single Tenant

tenant.data [Object]

An object that can hold any information about the Tenant that should be persisted.

tenant.emailConfiguration.enabled [Boolean] Deprecated

When this value is set to true the email configuration provided by this tenant will take precedence over the configuration by the System Configuration.

  Removed in version 1.8.0 In version 1.8.0 and beyond, a Tenant’s email configuration is enabled upon configuration.

tenant.emailConfiguration.forgotPasswordEmailTemplateId [UUID]

The Id of the Email Template that is used when a user is sent a forgot password email.

tenant.emailConfiguration.host [String] Available Since 1.8.0

The host name of the SMTP server that FusionAuth will use.

tenant.emailConfiguration.password [String] Available Since 1.8.0

An optional password FusionAuth will use to authenticate with the SMTP server.

tenant.emailConfiguration.passwordlessEmailTemplateId [UUID] Available Since 1.8.0

The Id of the Passwordless Email Template.

tenant.emailConfiguration.port [Integer] Available Since 1.8.0

The port of the SMTP server that FusionAuth will use.

tenant.emailConfiguration.properties [String] Available Since 1.8.0

Additional Email Configuration in a properties file formatted String.

tenant.emailConfiguration.security String Available Since 1.8.0

The type of security protocol FusionAuth will use when connecting to the SMTP server. The possible values are:

  • NONE - no security will be used. All communications will be sent plaintext.

  • SSL - SSL will be used to connect to the SMTP server. This protocol is not recommended unless it is the only one your SMTP server supports.

  • TLS - TLS will be used to connect to the SMTP server. This is the preferred protocol for all SMTP servers.

tenant.emailConfiguration.setPasswordEmailTemplateId [UUID]

The Id of the Email Template that is used when a user had their account created for them and they must set their password manually and they are sent an email to set their password.

tenant.emailConfiguration.username [String] Available Since 1.8.0

An optional username FusionAuth will to authenticate with the SMTP server.

tenant.emailConfiguration.verificationEmailTemplateId [UUID]

The If of the Email Template that is used to send the verification emails to users. These emails are used to verify that a user’s email address is valid. If either the verifyEmail or verifyEmailWhenChanged fields are true this field is required.

tenant.emailConfiguration.verifyEmail [Boolean]

Whether the user’s email addresses are verified when the registers with your application.

tenant.emailConfiguration.verifyEmailWhenChanged [Boolean]

Whether the user’s email addresses are verified when the user changes them.

tenant.eventConfiguration.events [Object] Available Since 1.8.0

A mapping of the configuration for each event type that FusionAuth sends. The event types that are the keys into this Object are:

  • user.action - When a user action is triggered

  • user.bulk.create - When multiple users are created in bulk (i.e. during an import)

  • user.create - When a user is created

  • user.email.verified - When a user verifies their email address

  • user.update - When a user is updated

  • user.deactivate - When a user is deactivated

  • user.reactivate - When a user is reactivated

  • user.login.success - When a user completes a login request

  • user.login.failed - When a user fails a login request

  • user.registration.create - When a user registration is created

  • user.registration.update - When a user registration is updated

  • user.registration.delete - When a user registration is deleted

  • user.registration.verified - When a user completes registration verification

  • user.delete - When a user is deleted

  • jwt.public-key.update - When a JWT RSA Public / Private keypair may have been changed

  • jwt.refresh-token.revoke - When a JWT Refresh Token is revoked

tenant.eventConfiguration.events[type].enabled [Boolean] Available Since 1.8.0

Whether or not FusionAuth should send these types of events to any configured Webhooks.

tenant.eventConfiguration.events[type].transactionType String Available Since 1.8.0

The transaction type that FusionAuth uses when sending these types of events to any configured Webhooks. The transaction types are:

  • None - No Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • Any - Only a single Webhook is required to succeed for the FusionAuth transaction to be committed.

  • SimpleMajority - A simple majority (50% or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • SuperMajority - A super majority (2/3 or more) of Webhooks are required to succeed for the FusionAuth transaction to be committed.

  • AbsoluteMajority - Every Webhook must succeed for the FusionAuth transaction to be committed.

tenant.externalIdentifierConfiguration.authorizationGrantIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a OAuth authorization code in no longer valid to be exchanged for an access token. This is essentially the time allowed between the start of an Authorization request during the Authorization code grant and when you request an access token using this authorization code on the Token endpoint.

Value must be greater than 0 and less than or equal to 600.

tenant.externalIdentifierConfiguration.changePasswordIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the change password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.changePasswordIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the change password Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.changePasswordIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a change password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.emailVerificationIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the email verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.emailVerificationIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the email verification Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.emailVerificationIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a email verification Id is no longer valid and cannot be used by the Verify Email API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.oneTimePasswordTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a One Time Password is no longer valid and cannot be used by the Login API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.passwordlessLoginGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the passwordless login.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.passwordlessLoginGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the passwordless login. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.passwordlessLoginTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a passwordless code is no longer valid and cannot be used by the Passwordless API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.registrationVerificationIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the registration verification Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.registrationVerificationIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the registration verification Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.registrationVerificationIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a registration verification Id is no longer valid and cannot be used by the Verify Registration API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.setupPasswordIdGenerator.length [Integer] Available Since 1.8.0

The length of the secure generator used for generating the setup password Id.

If the changePasswordIdGenerator.type == randomBytes then the length must be >= 16 and ⇐ 128. If the changePasswordIdGenerator.type == randomDigits then the length must be >= 4 and ⇐ 12.

tenant.externalIdentifierConfiguration.setupPasswordIdGenerator.type [String] Available Since 1.8.0

The type of the secure generator used for generating the setup password Id. Must be either randomBytes or randomDigits.

tenant.externalIdentifierConfiguration.setupPasswordIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a setup password Id is no longer valid and cannot be used by the Change Password API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.twoFactorIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until a two factor Id is no longer valid and cannot be used by the Two Factor Login API. Value must be greater than 0.

tenant.externalIdentifierConfiguration.twoFactorTrustIdTimeToLiveInSeconds [Integer] Available Since 1.8.0

The time in seconds until an issued Two Factor trust Id is no longer valid and the User will be required to complete Two Factor authentication during the next authentication attempt. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.actionDuration [Long] Available Since 1.8.0

The duration of the User Action. This value along with the actionDurationUnit will be used to set the duration of the User Action. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.actionDurationUnit [String] Available Since 1.8.0

The unit of time associated with a duration. The possible values are:

  • MINUTES

  • HOURS

  • DAYS

  • WEEKS

  • MONTHS

  • YEARS

tenant.failedAuthenticationConfiguration.resetCountInSeconds [Integer] Available Since 1.8.0

The length of time in seconds before the failed authentication count will be reset. Value must be greater than 0.

For example, if tooManyAttempts is set to 5 and you fail to authenticate 4 times in a row, waiting for the duration specified here will cause your fifth attempt to start back at 1.

tenant.failedAuthenticationConfiguration.tooManyAttempts [Integer] Available Since 1.8.0

The number of failed attempts considered to be too many. Once this threshold is reached the specified User Action will be applied to the user for the duration specified. Value must be greater than 0.

tenant.failedAuthenticationConfiguration.userActionId [UUID] Available Since 1.8.0

The Id of the User Action that is applied when the threshold is reached for too many failed authentication attempts.

tenant.familyConfiguration.allowChildRegistrations [Boolean] Available Since 1.8.0

Whether to allow child registrations.

tenant.familyConfiguration.confirmChildEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use when confirming a child.

tenant.familyConfiguration.deleteOrphanedAccounts [Boolean] Available Since 1.8.0

Whether to delete accounts that have been orphaned.

tenant.familyConfiguration.deleteOrphanedAccountsDays [Integer] Available Since 1.8.0

The number of days after an account has been orphaned before it is deleted. Value must be greater than 0.

tenant.familyConfiguration.enabled [Boolean] Available Since 1.8.0

Whether family configuration is enabled.

tenant.familyConfiguration.familyRequestEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use when a family request is made.

tenant.familyConfiguration.maximumChildAge [Integer] Available Since 1.8.0

The maximum age of a child. Value must be greater than 0.

tenant.familyConfiguration.minimumOwnerAge [Integer] Available Since 1.8.0

The minimum age to be an owner. Value must be greater than 0.

tenant.familyConfiguration.parentEmailRequired [Boolean] Available Since 1.8.0

Whether a parent email is required.

tenant.familyConfiguration.parentRegistrationEmailTemplateId [UUID] Available Since 1.8.0

The unique Id of the email template to use for parent registration.

tenant.httpSessionMaxInactiveInterval [Integer] Available Since 1.8.0

Time in seconds until an inactive session will be invalidated. Used when creating a new session in the FusionAuth OAuth frontend.

tenant.id [UUID]

The unique identifier for this Tenant.

tenant.issuer [String] Available Since 1.8.0

The named issuer used to sign tokens, this is generally your public fully qualified domain.

tenant.jwtConfiguration.accessTokenKeyId [UUID] Available Since 1.8.0

The unique id of the signing key used to sign the access token.

tenant.jwtConfiguration.idTokenKeyId [UUID] Available Since 1.8.0

The unique id of the signing key used to sign the Id token.

tenant.jwtConfiguration.refreshTokenTimeToLiveInMinutes [Integer] Available Since 1.8.0

The length of time in minutes a Refresh Token is valid from the time it was issued. Value must be greater than 0.

tenant.jwtConfiguration.timeToLiveInSeconds [Integer] Available Since 1.8.0

The length of time in seconds this JWT is valid from the time it was issued. Value must be greater than 0.

tenant.logoutURL [String] Available Since 1.8.0

The logout redirect URL when sending the user’s browser to the /oauth2/logout URI of the FusionAuth Front End. This value is only used when a logout URL is not defined in your Application.

tenant.maximumPasswordAge.days [Integer] Available Since 1.8.0

The password maximum age in days. The number of days after which FusionAuth will require a user to change their password. Required when systemConfiguration.maximumPasswordAge.enabled is set to true.

tenant.maximumPasswordAge.enabled [Boolean] Available Since 1.8.0

Indicates that the maximum password age is enabled and being enforced.

tenant.minimumPasswordAge.seconds [Integer] Available Since 1.8.0

The password minimum age in seconds. When enabled FusionAuth will not allow a password to be changed until it reaches this minimum age. Required when systemConfiguration.minimumPasswordAge.enabled is set to true.

tenant.minimumPasswordAge.enabled [Boolean] Available Since 1.8.0

Indicates that the minimum password age is enabled and being enforced.

tenant.name [String]

The unique name of the Tenant.

tenant.passwordEncryptionConfiguration.encryptionScheme [String] Available Since 1.8.0

The default method for encrypting the User’s password. The following encryptors are provided with FusionAuth:

tenant.passwordEncryptionConfiguration.encryptionSchemeFactor [Integer] Available Since 1.8.0

The factor used by the password encryption scheme. If not provided, the PasswordEncryptor provides a default value. Generally this will be used as an iteration count to generate the hash. The actual use of this value is up to the PasswordEncryptor implementation.

tenant.passwordEncryptionConfiguration.modifyEncryptionSchemeOnLogin [Boolean] Available Since 1.8.0

When enabled a user’s hash configuration will be modified to match these configured settings. This can be useful to increase a password hash strength over time or upgrade imported users to a more secure encryption scheme after an initial import.

tenant.passwordValidationRules.maxLength [Integer] Available Since 1.8.0

The maximum length of a password when a new user is created or a user requests a password change.

tenant.passwordValidationRules.minLength [Integer] Available Since 1.8.0

The minimum length of a password when a new user is created or a user requests a password change.

tenant.passwordValidationRules.rememberPreviousPasswords.count [Integer] Available Since 1.8.0

The number of previous passwords to remember. Value must be greater than 0.

tenant.passwordValidationRules.rememberPreviousPasswords.enabled [Boolean] Available Since 1.8.0

Whether to prevent a user from using any of their previous passwords.

tenant.passwordValidationRules.requiredMixedCase [Boolean] Available Since 1.8.0

Whether to force the user to use at least one uppercase and one lowercase character.

tenant.passwordValidationRules.requireNonAlpha [Boolean] Available Since 1.8.0

Whether to force the user to use at least one non-alphanumeric character.

tenant.passwordValidationRules.requireNumber [Boolean] Available Since 1.8.0

Whether to force the user to use at least one number.

tenant.themeId [UUID] Available Since 1.8.0

The unique Id of the theme to be used to style the login page and other end user templates.

Example Response JSON
{
  "tenant": {
    "data": {
      "description": "No more secrets, Marty."
    },
    "emailConfiguration": {
      "forgotPasswordEmailTemplateId": "49aba1de-0225-45d7-a2b1-f9fe46b0242c",
      "host": "smtp.sendgrid.net",
      "password": "password",
      "passwordlessEmailTemplateId": "a917e23a-da58-4cda-be01-90f542f8c343",
      "port": 587,
      "properties": {
        "key": "value"
      },
      "security": "TLS",
      "setPasswordEmailTemplateId": "a9aba13e-0125-4fd7-a2b1-aaa146b02423",
      "username": "username",
      "verificationEmailTemplateId": "8da42c09-461c-45f3-b931-6e9f63b87ab5",
      "verifyEmail": true,
      "verifyEmailWhenChanged": true
    },
    "eventConfiguration": {
      "events": {
        "user.delete": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.deactivate": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.bulk.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.reactivate": {
          "enabled": true,
          "transactionType": "None"
        },
        "jwt.refresh-token.revoke": {
          "enabled": true,
          "transactionType": "None"
        },
        "jwt.public-key.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.login.success": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.login.failed": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.create": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.update": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.delete": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.registration.verified": {
          "enabled": true,
          "transactionType": "None"
        },
        "user.email.verified": {
          "enabled": true,
          "transactionType": "None"
        }
      }
    },
    "externalIdentifierConfiguration": {
      "authorizationGrantIdTimeToLiveInSeconds": 30,
      "changePasswordIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "changePasswordIdTimeToLiveInSeconds": 600,
      "emailVerificationIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "emailVerificationIdTimeToLiveInSeconds": 86400,
      "oneTimePasswordTimeToLiveInSeconds": 60,
      "passwordlessLoginGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "passwordlessLoginTimeToLiveInSeconds": 180,
      "registrationVerificationIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "registrationVerificationIdTimeToLiveInSeconds": 86400,
      "setupPasswordIdGenerator": {
        "length": 32,
        "type": "randomBytes"
      },
      "setupPasswordIdTimeToLiveInSeconds": 86400,
      "twoFactorIdTimeToLiveInSeconds": 300,
      "twoFactorTrustIdTimeToLiveInSeconds": 2592000
    },
    "failedAuthenticationConfiguration": {
      "actionDuration": 3,
      "actionDurationUnit": "MINUTES",
      "resetCountInSeconds": 60,
      "tooManyAttempts": 5,
      "userActionId": "16cfc707-268c-4c5b-8989-f71f3ee156d4"
    },
    "familyConfiguration": {
      "allowChildRegistrations": true,
      "confirmChildEmailTemplateId": "87654321-4321-8765-ba09-ba0987654321",
      "deleteOrphanedAccounts": false,
      "deleteOrphanedAccountsDays": 30,
      "enabled": true,
      "familyRequestEmailTemplateId": "57462514-a73b-cd76-0001-b8a65cd61230",
      "maximumChildAge": 12,
      "minimumOwnerAge": 21,
      "parentEmailRequired": false,
      "parentRegistrationEmailTemplateId": "12345678-1234-5678-90ab-1234567890ab"
    },
    "httpSessionMaxInactiveInterval": 3600,
    "id": "32306536-3036-6431-3865-646430303332",
    "issuer": "https://example.com",
    "jwtConfiguration": {
      "accessTokenKeyId": "025233ca-d4f3-2aa4-eca9-7e4200e9b472",
      "enabled": true,
      "idTokenKeyId": "092dbedc-30af-4149-9c61-b578f2c72f59",
      "refreshTokenTimeToLiveInMinutes": 43200,
      "timeToLiveInSeconds": 3600
    },
    "logoutURL": "http://example.com/logout",
    "maximumPasswordAge": {
      "days": 180,
      "enabled": false
    },
    "minimumPasswordAge": {
      "enabled": false,
      "seconds": 30
    },
    "name": "Playtronics Co.",
    "passwordEncryptionConfiguration": {
      "encryptionScheme": "salted-pbkdf2-hmac-sha256",
      "encryptionSchemeFactor": 24000,
      "modifyEncryptionSchemeOnLogin": false
    },
    "passwordValidationRules": {
      "maxLength": 256,
      "minLength": 8,
      "rememberPreviousPasswords": {
        "count": 2,
        "enabled": true
      },
      "requireMixedCase": true,
      "requireNonAlpha": true,
      "requireNumber": true
    },
    "themeId": "c6ad3fac-6f32-4db7-91a4-061ff035e871"
  }
}

5. Delete a Tenant

This API is used to permanently delete a Tenant. Deleting a Tenant will delete all Users, Applications and Groups that belong to this tenant. Proceed with caution.

5.1. Request

Delete a Tenant by Id

URI

DELETE /api/tenant/{tenantId}

Table 13. Request Parameters

tenantId [UUID] Required

The unique Id of the Tenant to delete.

5.2. Response

This API does not return a JSON response body.

Table 14. Response Codes
Code Description

200

The request was successful. The response will be empty.

400

The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors.

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 are trying to delete 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.

503

The search index is not available or encountered an exception so the request cannot be completed. The response will contain a JSON body.

6. Retrieve the Password Validation Rules

This API has been available since 1.8.0

This API is used to retrieve the Password Validation Rules. This configuration is a subset of the Tenant configuration.

6.1. Request

Retrieve the Password Validation Rules

URI

GET /api/tenant/password-validation-rules/{tenantId}

Table 15. Request Parameters

tenantId [UUID] Required

The Id of the tenant.

6.2. Response

The response for this API contains the Password Validation Rules.

Table 16. Response Codes
Code Description

200

The request was successful. The response will contain a JSON body.

500

There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty.

Table 17. Response Body

tenant.passwordValidationRules.maxLength [Integer]

The maximum number of characters that are allowed for user passwords.

tenant.passwordValidationRules.minLength [Integer]

The minimum number of characters that are required for user passwords.

tenant.passwordValidationRules.rememberPreviousPasswords.count [Integer]

The number of previous passwords that should be remembered so they are not re-used by the User.

tenant.passwordValidationRules.rememberPreviousPasswords.enabled [Boolean]

Indicates that the remember previous password validation is enabled and being enforced.

tenant.passwordValidationRules.requireMixedCase [Boolean]

Indicates that passwords require an uppercase and lowercase character to be valid.

tenant.passwordValidationRules.requireNonAlpha [Boolean]

Indicates that passwords require a non-alphanumeric character to be valid.

tenant.passwordValidationRules.requireNumber [Boolean]

Indicates that passwords require at least one number to be valid.

Example Response JSON
{
  "passwordValidationRules": {
    "maxLength": 256,
    "minLength": 8,
    "rememberPreviousPasswords": {
      "count": 2,
      "enabled": true
    },
    "requireMixedCase": true,
    "requireNonAlpha": true,
    "requireNumber": true
  }
}