Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

MultiTenancy can be enabled in the appsettings file by updating “MultiTenancy” flag to true.

Code Block
"AppSettings": {
     
	“MultiTenancy”: true
}

Connection Strings

The connection strings for the EdFi_Admin and EdFi_Security databases are configured differently depending on whether the MultiTenancy feature is enabled or disabled.

Single-Tenant Configuration (the default)

In a single-tenant configuration, there is only one EdFi_Admin and EdFi_Security used by Admin API.

The connection strings are in the "ConnectionStrings" section, as follows:

Code Block
"ConnectionStrings": {
    "EdFi_Admin": "Server=(local); Database=EdFi_Admin; Integrated Security=True; Application Name=AdminApi;",
    "EdFi_Security": "Server=(local); Database=EdFi_Security; Integrated Security=True; Application Name=AdminApi;"
}

Multi-Tenant Configuration

In a multi-tenant configuration, each tenant has its own EdFi_Admin and EdFi_Security databases.

The connection strings are organized under distinct tenant entries in a "Tenants" section, as follows:

Code Block
"Tenants": {
    "Tenant1": {
      "ConnectionStrings": {
        "EdFi_Admin": "Server=(local); Database=EdFi_Admin_Tenant1; Integrated Security=True; Application Name=AdminApi;",
        "EdFi_Security": "Server=(local); Database=EdFi_Security_Tenant1; Integrated Security=True; Application Name=AdminApi;"
      }
    },
    "Tenant2": {
      "ConnectionStrings": {
        "EdFi_Admin": "Server=(local); Database=EdFi_Admin_Tenant2; Integrated Security=True; Application Name=AdminApi;",
        "EdFi_Security": "Server=(local); Database=EdFi_Security_Tenant2; Integrated Security=True; Application Name=AdminApi;"
      }
    }
  }