ProGet SDK Reference
Version:

TryGetPrincipal(string principalName) Method

Returns a IUserDirectoryPrincipal for the user or group with the specified name.

Syntax

public virtual IUserDirectoryPrincipal TryGetPrincipal(string principalName)

Parameters

principalName
Type: string

The name of the principal to look up.

Returns

A corresponding IUserDirectoryPrincipal for the specified name, if the principal was found in the directory; otherwise null (Nothing in Visual Basic).

Exceptions

System.ArgumentNullException

principalName is null (Nothing in Visual Basic) or empty.