Starts in:
1 DAY
7 HRS
39 MIN
48 SEC
Starts in:
1 D
7 H
39 M
48 S
Open Closed

how to pass tenant name with IdentityClients in console application #6335


User avatar
0
ElifKaya created

Hi,

I used IIdentityRoleAppService in my console application. I used AbpIdentityHttpApiClientModule in my application module. Also I defined IdentityClients values in appsettings.json.

Then, I seed application information to [OpenIddictApplications] table as below.

I used this application successfully in the same solution. But I want to use authserver endpoints from the another solution. But this client information just worked on the host, not tenant. I want to pass tenant name as a parameters like e userName or Password.

Can you help about it?

Thanks

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:

ABP Framework version: v7.3.1

UI Type: / MVC /

Database System: SQL Server,

Tiered (for MVC) or Auth Server Separated (for Angular): yes

Exception message and full stack trace:

Steps to reproduce the issue:


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    It will add the current tenant to the request header. https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs#L303

    You can try:

    using(currentTenant.Change(tenantId))
    {
        identityRoleAppService.....
    }
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06