cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Get objectSID from AD (LDAP)

brandonbollin
Active Participant
0 Likes
4,150

Fellow experts,
I'm trying to create a From LDAP pass, or maybe even use the uGetUserSid internal function, to get the objectSID attribute from a given entry in my target repository. I'm not having any success with uGetUserSid but I was able to bring something back on the From LDAP pass method. Problem is, when I pull up the results that show up in the SQL temp table, it's all mumbo-jumbo. The attribute is stored in LDAP as a binary attribute so what comes into IDM isn't the pretty looking S-1-5-21-xxxxxx-xxxxx format you see when you look at the attribute in an LDAP browser or ADUC.

I looked through my environment to see if there was an SAP supplied global script that would convert the binary format to text but alas, nothing. Any suggestions?

View Entire Topic
former_member2987
Active Contributor
0 Likes

Brandon,

I did a little googling and saw that the value is encoded. You might want to look at the functions for converting base64 strings and see if it is more direct. Otherwise I found the following links which may or may not be helpful.

Mr. Google can be your friend!

Good luck!

Java/JavaScript:

https://github.com/mcavage/node-ldapjs/issues/193

https://stackoverflow.com/questions/7118290/how-to-convert-the-sid-to-string-and-vice-versa-in-java

Powershell:

http://activelydirect.blogspot.com/2011/01/convert-active-directory-object.html

http://woshub.com/hot-to-convert-sid-to-username-and-vice-versa/

SQL:

https://www.sqlservercentral.com/Forums/Topic458324-1203-1.aspx

brandonbollin
Active Participant
0 Likes

I say this before having clicked any of your links, I Googled the living daylights out of this thing and couldn't find any satisfactory answers! 🙂

Maybe you knew better what series of keywords to enter. I'll let you know the results and many thanks, as usual, sir.

former_member2987
Active Contributor

I think I used:

how to convert ad objectsid

and

how to convert ad objectsid javascript

I've had the same thing happen. That's what we're here for! 🙂