Starts in:
2 DAYS
1 HR
3 MIN
14 SEC
Starts in:
2 D
1 H
3 M
14 S
Open Closed

Set Tenant on HttpClientToken authentication #4016


User avatar
0
andmattia created
  • ABP Framework version: v5.3.1
  • UI type: Angular / WinFomr
  • DB provider: EF Core * Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I try to login from winfrom using IIdentityModelAuthenticationService it works fine on host but how can I set the tenant? How can get tenat Id from name?

using (var cs = _provider.CreateScope())
                {
                    _tenant.Change(myTenantGuid, txtTenant.Text);


                    AsyncHelper.RunSync(() =>
                        _tokenManager.ObtainAccessToken(txtUser.Text, txtPassword.Text, txtUrl.Text));
                    var q = AsyncHelper.RunSync(() => _appService.GetAsync());
                   
                }

1 Answer(s)
  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    Can you check the response headers? If you are logging as a tenant user, response should have tenant information.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06