post https://{application_vanity_domain}/api/v1/tenant-discovery/fetch-tenants
Fetches all distinct tenants that a user is associated with within an application that satisfy the following criteria:
- The tenant must contain a user whose email matches the specified email in the tenant discovery request.
- The user's email must be verified.
- The user must have an
ACTIVEstatus - The tenant must have an
ACTIVEstatus. - The tenant type must not be equal to
GLOBAL.
Note, this API can be called in three distinct ways.
- The first way is directly. With this approach, the
applicationIdandemailfields must be provided in the request body. Optionally, aclientIdcan be provided to utilize the login URL from the client when resolving the login URLs returned in the response. - The second way is from a tenant discovery email flow. With this approach, the
emailAuthCodefield must be provided in the request body. The results returned in the response will be based on theapplicationIdandemailfields that were specified when the tenant discovery email was sent. - The third way is from a tenant discovery OTP email flow. With this approach, the
requestCodeandverificationCodefields must be provided in the request body. The results returned in the response will be based on theapplicationIdandemailfields that were specified when the tenant discovery OTP email was sent.
This API utilizes cursor pagination with the results being sorted by tenantDomainName in ascending order.
Required Permissions
Below is the list of required permissions needed to interact with this API. For each permission, the allowed permission boundaries are also specified.
| Permission | Boundary | Description |
|---|---|---|
| tenant-discovery-workflow:execute | Application | The subject can perform this operation for requests associated with the application to which the subject belongs. |