I want to run a query on AD to find what user has a SID. If I have the string version of the SID (ie S-1-5-21-427426699-165134457-1240836222-8649). So my query would consits of:
"<" & oConfig.adspath & ">;(&(objectCategory=person)(objectClass=User)(objectSid=S-1-5-21-427426699-165134457-1240836222-8649));name,canonicalName,distinguishedName,info;subtree"
However I can not get any results. I have tried using the Hex version of the SID but could not query with that either. Anyone know of a way to do this?
"<" & oConfig.adspath & ">;(&(objectCategory=person)(objectClass=User)(objectSid=S-1-5-21-427426699-165134457-1240836222-8649));name,canonicalName,distinguishedName,info;subtree"
However I can not get any results. I have tried using the Hex version of the SID but could not query with that either. Anyone know of a way to do this?