Closed stynky1 closed 5 years ago
Hi @stynky1, apologies for the long reply.
Can you change your usernames.eloquent
configuration option to sAMAccountName
? This should match the username field you're using in your users
database table schema.
Also, can you try removing ADLDAP_ADMIN_ACCOUNT_PREFIX
from your ENV and instead set the ADLDAP_ADMIN_ACCOUNT_SUFFIX
to company.com
, then try authenticating again?
@stevebauman , hi,
Thanks for your response. I'll try tomorrow and let you know.
Stefan
@stevebauman , hi,
I've just tried it with the new ldap tutorial. It's not working. I receive the error that sAMAccountName is not defined in UserResolver.php. Im very sure that this is the correct way to use it because I'm logging in with another class with this parameter.
Let me know if you have other ideas.
Can you see if this is a possible casing issue with sAMAccountName
? Lowercase your input fields in the HTML view as well as the eloquent
configuration option and see if it still occurs.
Also can you post your LoginController.php
file?
can you check in your LoginController if the username is well formatting as the one you use to login, just dd($username);
Closing due to inactivity.
Description:
Hello guys! I'm trying for the last 4 days to connect to my Active Directory with Adldap2. I have followed the Quick Start tutorial and also used Tinker for debugging but with no luck. I'm trying to use sAMAccountName.
In Tinker when creating connection, user authenticates, but when attempt() I recive False.
Can you help?
I know my username and password work because I'm using a different function with them to authenticate on the same AD but not in Laravel.
Steps To Reproduce:
my .env
adldap.php
adldap_auth.php
added in config/app.php
in Auth/LoginController.php
Login.blade.php
config/auth.php
migration Schema