Visual Guard Class Library Documentation

VGRoles.RemoveUserFromRole Method (NTAccount, String)

Removes the specified user from the specified role.

public static void RemoveUserFromRole(
   NTAccount account,
   String roleName
);

Parameters

account
The windows account to remove from the specified role.
roleName
The role to remove the specified user from.

Exceptions

Exception Type Condition
ArgumentNullException roleName is null.

-or-

account is null.
ArgumentException roleName is an empty string or is longer than 64 characters or contains invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',').

-or-

account was not declared in the repository or cannot be converted to SID.
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.RemoveUserFromRole Overload List