In my Cocoa app how can I get the current user's domain when they're logged in via Active Directory?
I need to determine two things:
- If the current user is logged on to an Active Directory domain (only need to handle Active Directory).
- If 1, the domain of the user.
I've found references to Directory Services and the Open Directory Programming Guide but the latter is 10.6 only (I must support 10.5+) and I could not find any examples for the former that gave me an idea of what I needed to do.