Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

How to get the DomainSid or domain Sid ?

$
0
0
Hi,

I would like to use this:

SecurityIdentifier sidAdmin = new SecurityIdentifier(WellKnownSidType.AccountDomainAdminsSid, domainSid);

But i don't know how to get the domainSid. I tried this:

SecurityIdentifier domainSid = new SecurityIdentifier(WellKnownSidType.BuiltinDomainSid,null);

But when it is applied, an exception indicates that the domainSid is not valid.

How to retrieve it?

Thanks

Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>