Visual Guard Class Library Documentation

VGRoles.GetRolesForUser Method (NTAccount)

Gets a list of the roles that a Windows account is in.

public static string[] GetRolesForUser(
   NTAccount account
);

Parameters

account
The Windows account to return a list of roles for.

Return Value

A string array containing the names of all the roles that the specified user is in.

Exceptions

Exception Type Condition
ArgumentException account cannot be converted to a valid SID.
ArgumentNullException account is null.
SecurityException The current user has not enough privileges to use Membership API. The Membership access level of the application must be sufficient to allows this action or the 'Membership Manager' role must be granted to the user by using the Visual Guard console.

See Also

VGRoles Class | Novalys.VisualGuard.Security.Membership Namespace | VGRoles.GetRolesForUser Overload List