IAdmSpecificObjectCondition

The IAdmSpecificObjectCondition interface represents the If the object is <specific object> condition.

Inheritance: IAdmCondition

Properties

  • Property

  • Description

  • IsOperator

  • Gets or sets a value indicating whether the object should or should not be the specified object for the condition to be met.

  • ObjectToCompareWith

  • Gets or sets the object for comparison.

Details

IsOperator

Gets or sets a value indicating whether the object should or should not be the specified object for the condition to be met.


ObjectToCompareWith

Gets or sets the object for comparison.

Examples

The following code sample creates a condition that returns true if the target object is the SuperAdmins group.

PowerShell
# The $actionSet variable refers to an action set in a
# business rule, custom command, or scheduled task.

# Create condition.
$condition = $actionSet.Conditions.CreateEx("adm-SpecificObjectCondition")
$specificObjectCondition = $condition.GetCondition()
$specificObjectCondition.IsOperator = "ADM_ISOPERATOR_IS"

$objReference = New-Object "Softerra.Adaxes.Adsi.AdmObjectReference"
$objReference.ObjectDN = "CN=SuperAdmins,OU=Groups,DC=domain,DC=com"
$specificObjectCondition.ObjectToCompareWith = objReference

# Save changes.
$condition.SetCondition($specificObjectCondition)
$condition.SetInfo()
$actionSet.Conditions.Add($condition)
C#
// The actionSet variable refers to an action set in a
// business rule, custom command, or scheduled task.

// Create condition.
IAdmBusinessRuleCondition condition = (IAdmBusinessRuleCondition)actionSet.Conditions.CreateEx(
    "adm-SpecificObjectCondition");
IAdmSpecificObjectCondition specificObjectCondition =
    (IAdmSpecificObjectCondition)condition.GetCondition();
specificObjectCondition.IsOperator = ADM_ISOPERATOR_ENUM.ADM_ISOPERATOR_IS;

IAdmObjectReference objReference = new AdmObjectReference();
objReference.ObjectDN = "CN=SuperAdmins,OU=Groups,DC=domain,DC=com";
specificObjectCondition.ObjectToCompareWith = objReference;

// Save changes.
condition.SetCondition(specificObjectCondition);
condition.SetInfo();
actionSet.Conditions.Add(condition);

Requirements

Minimum required version: 2019.1

See also