Skip to content

FindIdentity

Returns an identity on specified path. If no identity is matched returns null.

1
$Membership.FindIdentity(path: string, type: IdentityType):Identity

Parameters

string path
    Specifies the path of identity depending on identity type.

IdentityType type
    Specifies the type of identity to be found. If not specified "User" type is used.

Remarks

Path and Type arguments may be one of following values User : Logon id of user. Ex: "John.doe" Group : Name of group. Ex: "Developers" OrganizationUnit : Qualified path of organization unit. Ex: "General Management\Accounting"

Find User

1
var user = $Membership.FindIdentity('elton.john');

Find Group

1
var group = $Membership.FindIdentity('Developers','Group');

Info

When specifying organization unit path, either "\" or "/" is valid.

Find Organization Unit

1
var orgUnit = $Membership.FindIdentity('General Management\\Accounting','OrganizationUnit');

Types

IdentityType

( "User" | "OrganizationUnit" | "Position" | "Group" )

See Also