API Reference
Class
PrincipalResolver
Normalizes principal identifiers (names, localized names, or SID strings) to canonical SID strings to enable stable comparisons across languages and environments.
Inheritance
- Object
- PrincipalResolver
Methods
public static String[] NormalizeToSidStrings(IEnumerable<String> principals, String computerName = null) #Returns:
String[]Normalizes a set of principals into SID strings, skipping those that cannot be resolved.
Parameters
- principals System.Collections.Generic.IEnumerable{System.String}
- computerName System.String = null
public static String ToDisplayName(String sid, String computerName = null) #Returns:
StringBest-effort conversion from SID to a display name. On Windows, asks the OS; otherwise returns the SID.
Parameters
- sid System.String
- computerName System.String = null
public static Boolean TryNormalizeToSid(String principal, out String sid, String computerName = null) #Returns:
BooleanNormalizes an input principal name (any language) or SID to a canonical SID string. On Windows, attempts OS resolution for localized names. On non-Windows, falls back to built-in maps.
Parameters
- principal System.String
- sid System.String@
- computerName System.String = null
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object