i need some help if someone run into the same problem i am having right now, as i have been asked to add support a login using Active Directory, i have managed to succeed the login process and the models creations of users, and now i want to populate some details from AD into the app database, i want to get the manager of manager of an employee, as i have been searching i found that the team lead N+1 field is named "manager" on ad so i have queried this using this command
AUTH_LDAP_USER_ATTR_MAP = {
"first_name": "givenName",
"last_name": "Name",
"email": "mail",
"employee_manager": "manager",
"employee_office": "physicalDeliveryOfficeName",
"employee_cost_center": "extensionAttribute8"
}
The problem here is i got this in my database
CN=TeamLeadName,OU=Users,OU=T,OU=C,OU=C,DC=domain,DC=net
so know i don't have any idea how to get only the name of the team lead and not the rest and from there how i can get the team of the team lead or in other word the initial employee manager. Any help will be so much appreciated.