Open Closed

Login as a tenant not working ? #10469


User avatar
0
erkan.uci created

Hi , I was triyng login as a tennats page is not open. and no errors aswell ?


2 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • In ABP, the “Login as tenant / Switch tenant” UI is shown only if multi-tenancy is enabled AND a tenant resolver (cookie/querystring/header/domain) is active. If the page/button does nothing and you see no error, most commonly the UI can’t determine/resolve the tenant context, so it doesn’t open the tenant switch dialog/page.
    1. Ensure multi-tenancy is enabled
    • Check your appsettings.json (Host and AuthServer if you have separated auth):
    {
        "MultiTenancy": {
          "IsEnabled": true
        }
      }
    
    1. Ensure you didn’t remove/clear tenant resolvers
    • Verify you didn’t customize AbpTenantResolveOptions and accidentally clear resolvers (this is a common reason tenant switching disappears/breaks).
    • If you have such configuration, make sure you keep the standard resolvers you need (cookie/querystring/header/domain). For example, don’t do this unless you really mean it:
    Configure<AbpTenantResolveOptions>(options =>
      {
          options.TenantResolvers.Clear(); // <- this can break tenant switching
      });
    
    1. Angular UI: confirm the tenant switch is loaded and tenant header is sent
    • Angular gets the selected tenant from the application-configuration response and then sends it as the __tenant header on requests. If application-configuration is failing or not reachable, tenant switching won’t work correctly.
    • Open browser DevTools → Network and check that GET /api/abp/application-configuration returns 200.
    1. If you use separated AuthServer / multiple apps: align the cache key prefix across apps
    • If tenant resolution works in one service but not the other (e.g., host works, but “login as tenant” fails or silently doesn’t proceed), a known cause is different cache key prefixes between projects/services. Make sure your apps use the same cache prefix / shared cache configuration (especially if using Redis / distributed cache across AuthServer + HttpApi.Host).
    1. If you intentionally customized the login layout/theme
    • If you edited/replaced the Account layout (theme) you might have removed/hidden the tenant switch link (AbpTenantSwitchLink) from the login page. Re-check your Account layout customizations.

    Links (verified)

    • https://abp.io/docs/latest/framework/ui/angular/multi-tenancy
    • https://abp.io/community/articles/4foaup7p

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share a GIF or some screenshots?

    Thanks

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on February 17, 2026, 09:10
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.