1

I've setup a test solution to experiment with Ldap Authentication.

I've followed the documentation and looked into this as well, then I've setup my MyLdapAuthenticationSource in the Core project along with the package Abp.Zero.Ldap and set Configuration.Modules.ZeroLdap().UseUserPrincipalNameAsUserName = true;

When I tried to login I receive Invalid Username or Password message.

Additionally, I setup a default .NET 5 Microsoft solution to verify that I'm able to connect to the Active Directory directly and it worked as expected.

Nasser X
  • 175
  • 3
  • 10

1 Answers1

1

I was able to solve this by changing the Settings in the application and DB, it was mentioned in the documentation by wasn't detailed on how to change them.

First:

I've defined a new Setting to be added to the DB in DefaultSettingsCreator in the Seed Host folders under EntityFrameworkCore project:

AddSettingIfNotExists(LdapSettingNames.IsEnabled, "true", tenantId);

Second:

I've defined a new SettingDefinition in the AppSettingProvider in the Configuration folder under Core project:

new SettingDefinition(LdapSettingNames.IsEnabled, "true", scopes: SettingScopes.Application | SettingScopes.Tenant | SettingScopes.User)

Hope this helps future users.

Nasser X
  • 175
  • 3
  • 10