Base solution for your next web application
Open Closed

Get AbpSetting from host - but need from Tenant (Angular UI - ASPNET Core BE) #11826


User avatar
0
pliaspzero created

Hi,

I pass tenantId from UI to API - the value of tenantId is correct - then I try to set using (CurrentUnitOfWork.SetTenantId(tenantId))

and request for a setting the value: var partnerNameFromDB = await SettingManager.GetSettingValueForTenantAsync(AppSettings.SAMLLoginManagement.PartnerName, AbpSession.GetTenantId());

But what I get as result is the setting from host (where TenandId in database is NULL)

Any idea - here my code:

[HttpGet] public async Task<IActionResult> InitiateMySingleSignOn(string returnUrl, int tenantId) { Logger.Info("returnUrl" + returnUrl + " - tenantId" + tenantId.ToString());

        using (CurrentUnitOfWork.SetTenantId(tenantId))
        {
            try
            {
               var partnerNameFromDB = await SettingManager.GetSettingValueForTenantAsync(AppSettings.SAMLLoginManagement.PartnerName, AbpSession.GetTenantId());
               

Thanks


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @pliaspzero

    Is there a setting with TenantId is filled with given tenantId on your database ? If so, could you share a screenshot of it ?