-
Is it possible to fetch the extensionAttributes of a user from Active Directory? I've tried adding extensionAttribute2 for example, to the search query - but this seems to return blank in my result when I try to use GetAttributeValue on the entry searchRequest := ldap.NewSearchRequest(
{redacted},
ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,
"(objectClass=organizationalPerson)",
[]string{"givenName", "sn", "displayName", "description", "mail", "userPrincipalName", "sAMAccountName", "extensionAttribute2", "extensionAttribute3"},
nil,
)
extensionAttribute := entry.GetAttributeValue("extensionAttribute2") // returns '' |
Beta Was this translation helpful? Give feedback.
Answered by
jaycdev
Jan 30, 2024
Replies: 1 comment
-
Nevermind, it does work - I did not realise some of my test users did not have this set |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cpuschma
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nevermind, it does work - I did not realise some of my test users did not have this set