I wonder if there's any equivalent terminal command that can output the same data displayed when the I search for the domain user Under Users in the OD node (/Active Directory/MYCOMP/...)

the data is a dictionary with fields like AltSecurityIdentities, dsAttrTypeNative:.. , and more.

I'm looking for macOS(10.12+) native, command line tool, that can extract an input user AD details that contains fields like AuthenticationAuthority and AltSecurityIdentities quite similar to Diretory Utility Gui based application (/System/Library/CoreServices/Applications/Directory Utility.app).

Is it possible to script user lookups?


1 Answer 1


The command that ships with macOS to do LDAP lookups works with many Active Directory servers.

dscl /LDAPv3/ldap.company.com -list /Users UniqueID

The above command will list out directory users. If you bind your Mac to AD you can get lots more integrations, but it’s not needed to just read the directory. I tries power shell in the past, but ran into errors installing the Active Directory modules but that might also be a promising tool if that fits your definition of “native”

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .