Base solution for your next web application
Open Closed

Fetching tenant specific details using tenantId, without using cache/session in host API application. #10475


User avatar
0
ASPNetZero.SERD created
  • What is your product version? 10.4.0

  • What is your product type (Angular or MVC)? Angular

  • What is product framework type (.net framework or .net core)? .net core

  • What is ABP Framework version? ABP 6.4

We need to get particular tenant specific details/settings through Host API application by passing tenantId to it from an external angular application, without using cache/session in Host API application. Is There a way? please guide us.

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

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

    Hi @ASPNetZero.SERD

    Could you share which information you want to get ? You can alwast add a new application service and use repositories in it to directly query the database and return result to client.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ASPNetZero.SERD created

    Hi @ismcagdas

    Thank you for the response. Could you please share any reference, which tells us how to use repositories in application service and to directly query the database?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Sorry for my late reply. You can inject IRepository<Tenant> and query AbpTenants database table. You can also use IDbContextProvider<YourDbContext> to access the DbContext directly.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ASPNetZero.SERD created

    Thank you for the reply @ismcagdas

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @ASPNetZero.SERD Let me know if you face any problem related to this. You can always reopen the issue if you need to.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ASPNetZero.SERD created

    We need to access external login settings for the tenant. How can we get that info ? as quering the database will not work, example we need to access microsoft configured client id which is encrypted in database. So how can we get that info ? can you guide us on that.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    As far as I know, you can't decrpy this information. It is used by Microsoft libraries and comparead to encrypted values at runtime.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)