$Membership.FindIdentity

Overview

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

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

Arguments

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.

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"

Example

Find User

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

Example

Find Group

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

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

Example

Find Organization Unit

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

Types

IdentityType

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

Copyright © 2010 - 2023 Emakin. All rights reserved.