Programmatically retrieve LDAP attributes when Mac is bound to Active Directory using Apple Enterprise Connect

My Mac is connected to Active Directory using Apple Enterprise Connect utility.


I have a Mac application developed using Objective-C.

I want to programmatically retrieve LDAP attributes of currently logged in user.


Can anyone please let me know how I can achieve this?

Replies

The best way to handle this depends on how this LDAP binding is done in your specific environment. If you run the following command on the Mac in question, does it print the attributes you need?

% dscl localhost -read "/Search/Users/$USER"

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"