Python: Using PYAD to authenticate users with Active Directory

1.2k Views Asked by At

So I realize you can use this function to check if the password a user entered id correct

pyad.set_defaults(ldap_server="X.X.X.X",username=username,password=password)

all I have to do is provide a username/password

then

try:
    user=pyad.aduser.ADUser.from_guid("A guid that you know works") 
except:
    print("Invalid Credentials")

But I wanted to know if there was perhaps a better way to do this. It seems like PYAD isn't really meant for this.

0

There are 0 best solutions below