Published Friday, February 22, 2008 6:29 AM by martin

Windows SID Conversion Utility

Recently I wanted a tool that could convert a SID in SDDL format (such as S-1-5-20) into a Windows account name.  I'm sure there must be a lot of utilities out there to do this, but I couldn't find one.  So I wrote one.

You can download it here.

It's really just 2 lines of C# code, like so...

SecurityIdentifier sid = new SecurityIdentifier(sddlFormatSidString);
NTAccount ntac = (NTAccount)sid.Translate(typeof(NTAccount));