Base solution for your next web application
Open Closed

How to pass TenantID or Tenancy Name in Query String to Login Page #11481


User avatar
0
maharatha created

I am using the latest version of Aspnet Zero (Angular+.NET Core).

I will be using Okta as my SSO , so when I am sending an invite to the user I want to send the tenancyname or tenantid in the query string. So when complete registration and land back on the login page with Tenancy name or Tenantid on the query string i want to grab that and be able to select the Tenant automatically.


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

    Hi @maharatha

    Are you able to pass tenantId or tenancy name to OKTA ?

  • User Avatar
    0
    maharatha created

    Yes I am able but I don't know where to read the query string and set the TenantID in the cookie so that the Tenant changes

  • User Avatar
    0
    ismcagdas created
    Support Team

    Could you share how do you pass it to OKTA ? Are you able to get it back from OKTA on your login page ? We recently introduced tenant resolves for the Angular app, see https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/shared/multi-tenancy/tenant-resolvers/query-string-tenant-resolver.ts. So, you can just pass abp_tenancy_name query string parameter to your Angular app and tenant should be set.

  • User Avatar
    0
    maharatha created

    Thank You very much, this solved my 1 week of pain and agony.

    I am glad I asked this question, I wish i knew this was something that was released.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @maharatha

    I'm glad that your problem is solved :). We include these items in release notes but maybe we should include more details and write a blog post about each release and provide a bit more detail.

    We will consider this for the following versions.