Skip to content

GetProperty

Retrieves a specific property value associated with a given identity.

1
$Membership.GetProperty(identity: ( string | Identity ), property: string):( string | number | DateTimeOffset )

Parameters

( string | Identity ) identity
    The identity from which to retrieve the property.

string property
    The name of the property to retrieve.

Returns

The value of the specified property for the given identity.

Remarks

The property parameter can refer to either a well-known property or a generic property.
Well-known Properties: These are predefined properties with specific meanings:
- Id: Returns the unique identifier of the identity.
- Name: Returns the first name of a person identity.
- Surname: Returns the surname of a person identity.
- EMailAddress: Returns the email address associated with the identity.
- DisplayName: Returns the display name of the identity.
- Language: Returns the language preference of the identity.
Generic Property Names: These properties are resolved by the configured membership provider. For instance, the "Organization" membership provider may use repository column names as property names.
Examples of generic property names:
- Employee.RegistryNumber: Returns the registry number of the employee.
- Employee.StartDate: Returns the start date of the employee.
- Employee.Department.Name: Returns the department name of the employee.
- Employee.Department.Id: Returns the department ID of the employee.

Retrieving the name of the initiator:

1
$Membership.GetProperty( $Initiator, 'Name')

Retrieving the department of the initiator:

1
$Membership.GetProperty( $Initiator, 'Employee.Department.Name')

See Also