🕸️ Tenants
Last updated
Was this helpful?
Last updated
Was this helpful?
Using tenants along a multi-tenant license you can run one single installation of ngSurvey shared across multiple organizations or customers having each their own separate users, groups, surveys and system settings that can be managed either at the tenant level or globally from the root tenant.
Each tenant can be setup using host names or domains that ngSurvey will use to know under tenant it should run. Internally each tenant has its own isolated database allowing you to run tenants under different servers or regions that the main ngSurvey database.
New tenants can be added and managed from the System / Tenant screen.
Organization
unique name of the tenant. This cannot be changed later on.
Domain
is the domain / host under which the tenant will run. You can have one or multiple domains / hosts per tenant.
Use custom connection string
let you define your own connection string to an ngSurvey database that will be used by the tenant.
Copy system settings
copy over the tenant root system settings over to the newly created tenant.
Tenants can be removed or edited from the System / tenant screen. You can see at any point of the time the status of your tenant and its database.
In case of updates on newer versions NGSurvey will automatically updates all tenants database if you have AutoDBUpgrade in place for automatic upgrading. Should you have disabled the automatic upgrade you can use the Upgrade tenants option to upgrade all tenants databases that are not in sync with the root ngSurvey installation.
Be careful if you delete a tenant with its database as the data cannot be recovered unless you have a database backup.
Tenants are chosen by ngSurvey based on the domain / host that is used to call the ngSurvey website however if administrators can access all the different tenants using the tenant switch.
Using the switch you can chose any tenants of your choice, once selected ngSurvey will run under the context of this tenant letting you edit and manage all the data, users, settings that is available under this tenant.
As with the surveys and administration section ngSurvey will automatically run the API call based on the domain/host that is used to call the API. It is however possible to force the API call to run under a given tenant context when called from the root tenant by adding following header name / value in your HTTP call.
X-NGS-TenantId:TenanId
To impersonate the current user to access a tenant you need to call the API using an administrator account from the root tenant.