How to retrieve domain computer's sid

2

I'm trying to retrieve the domain sid for the local machine (not the machine sid). I need to be able to retrieve it without incurring network traffic to the AD server.

I found these links:

http://microsoft.public.platformsdk.security.narkive.com/y8UW72ww/how-to-get-the-domain-sid-of-the-domain-the-computer-belongs-to

How can I retrieve a Windows Computer's SID using WMI?

And tried to GetComputerName followed by using IADsNameTranslate to convert to a sid, but when setting the name to translate I get error: 0x80072116 "Could not find the name or insufficient right to see name".

Can you point me in the right direction?

c++
windows
winapi
asked on Stack Overflow Dec 3, 2015 by Scott Langham • edited May 23, 2017 by Community

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0