Base solution for your next web application
Open Closed

Microsoft/Azure AD/Entra ID SSO/Social Login at the Host Level #12120


User avatar
0
Abaco created

Hi,

I noticed you guys have host-level settings for SSO to Microsoft and other social logins but for some reason that can't be used for the host logins only tenants. Is that by design and what's the reason for it?

Is there a way to configure the host login to accept social login via Microsoft/Azure AD/Entra ID?


6 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @Abaco,

    You should configure this setting "AllowSocialLoginSettingsPerTenant": false, https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Features-Mvc-Core-Social-Logins#social-logins

  • User Avatar
    0
    Abaco created

    That is already the case, but when I enable any of the social logins such as Microsoft, it only shows the buttons for login at the tenant level. I understand that setting controls whether or not the tenant has access to configuring additional social logins, etc.

    What I'm looking for is to use those social login settings I defined in appsettings.json but in the Host login.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Yes, this is by design. You can modiy Login.cshtml (See https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/Views/Account/Login.cshtml#L95) and remove some conditions to achieve what you want.

  • User Avatar
    0
    Abaco created

    Ok, I'm using the Angular template, but think I found what I needed in MyCompanyName\src\MyCompanyName.Web.Host\src\account\login\login.component.html by negating multiTenancySideIsTeanant in the associated areas. Gonna check out if the whole flow works ok.

  • User Avatar
    0
    Abaco created

    Also had to change MyCompanyName\src\MyCompanyName.Core\Authorization\Users\UserRegistrationManager.cs in order to comment out CheckForTenant call in RegisterAsync and all tenant-dependent logic in there.

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @Abaco,

    I believe your issue has been resolved. If you need further assistance, please feel free to reach out to us.