Tchater maintenant avec le support
Tchattez avec un ingénieur du support

On Demand Migration Current - Active Directory - Directory Sync Advanced Mapping Guide

Action

These functions are used to gather or set values based on other attributes. Some functions will simply return a value and others will return a computed value based on data found within the parameters or complex attribute data.

Lookupvalue

  • Purpose:  Allow you to lookup a value and replace value with returned value leveraging Data Sets

  • Example:

  • lookupvalue("TFH-OUS",S.Department,getdn(cn))

encodePWD

  • Purpose: Used to encode a string password so that it can be applied to newly created objects in Local AD.  This method should not be used to set the password on a cloud object.

  • Syntax:  EncodePwd(password)

  • Example:

Target Attribute    : unicodePwd

Value        : EncodePwd(Profile.DefaultPassword)

Condition    : Action = "create"

GetAccountDisabled

  • Purpose: Calculates whether to create a target cloud object as enabled or disabled. This does not apply to local AD environments. If the source is a local AD object, the function will read the UserAccountControl and determine if the object should be enabled or disabled.

  • Syntax: GetAccountDisabled()

  • Example:  This example is also a default mapping for cloud environments. It will set the account as enabled or disabled if we create the object, or update an object that was created by Directory Sync. The limit of only updating objects created by Directory Sync can be removed by removing everything in the condition field.

Target Attribute    : AccountDisabled

Value        : GetAccountDisabled()

Condition    : Action = "create" or (Action = "update" and Target.HasCreateStamp)    

ReplaceDomain

  • Purpose: Replaces the domain part of the given attribute with the value specified.

  • Syntax: ReplaceDomain(attribute, value)

  • Attribute can be any attribute that contains an @domain…. Value

  • Value specified can be text or anything that represents a domain name.

  • Example 1:

This example replaces the Domain value of the source userPrincipalName with the domain value selected in the Stage Data step of a workflow

Target Attribute    : userPrincipalName

Value        : ReplaceDomain(S.userPrincipalName, Profile.TargetDomain)

Condition    : Null    

  • Example 2:

This example replaces the Domain value of the source Target address with the domain value selected in the Stage Data step of a workflow

Target Attribute    : TargetAddress

Value        : ReplaceDomain(S.TargetAddress, Profile.TargetDomain)

Condition    : AllowTargetAddress()

GetProxyAddresses

  • Purpose: Create list of Proxy addresses removing any duplicates that are found.

  • Syntax: GetProxyAddresses(SourceProxyAddresses,TargetProxyaddresses, address1,Address2,address3)

  • Example:   Local to Local environment merge Source and Target Proxyaddresses in Target Object

Target Attribute    : Proxyaddresses

Value        :  GetProxyAddresses(S.proxyAddresses, T.proxyAddresses, prefix(Result("mail"), "SMTP:"), prefix(legacyExchangeDN, "x500:"), prefix(Result("legacyExchangeDN"), "x500:"))

Condition    :

  • Example:   Cloud to Cloud environment.  SourceProxyAddresses is set to Null by default to avoid errors adding domains which are not accepted by Office 365.

Target Attribute    : Proxyaddresses

Value        :  GetProxyAddresses(null, T.EmailAddresses, prefix(Result("WindowsEmailAddress"), "SMTP:"), prefix(LegacyExchangeDN, "x500:"))

Condition    :

GetLegacyExchangeDN

  • Purpose: Generate a legacyExchangeDN value using the given exchange org and cn.

  • Syntax: GetLegacyExchangeDN(exchangeOrg, cn)

  • Example: Set the legacy exchange DN for a user in the target

Target Attribute    : legacyExchangeDN

Value        : GetLegacyExchangeDN(Target.ExchangeOrg, ObjectId)

Condition    : Null

GetObjectClass

  • Purpose: Calculates the objectClass from profile settings and the source or target object's class

  • Syntax: GetObjectClass()

  • Example:  Add (contact) to the end of DisplayName if the target object is a contact, if not a contact set same as the source.

Target Attribute    : DisplayName

Value        : if(GetObjectClass()="contact", S.DisplayName+" (Contact)", S.DisplayName)

Condition    :

GetTargetAddress

  • Purpose: Calculates targetAddress, by using source primary SMTP, mail, or userPrincipalName

  • Syntax: GetTargetAddress()

  • Example:  Set the target address for a user with the following attributes

  • UPN Mail attribute first.m.last@domain.com

  • Primary SMTP address first.last@domain.com

  • UPN first.last@domain.com

Target Attribute    : targetAddress

Value        : GetTargetAddress()

Condition    :

  This will result in the value of SMTP being used.

GetRecipientTypeDetails

  • Purpose: Determines the correct value for RecipientTypeDetails or msExchRecipientTypeDetails

  • Syntax: GetRecipientTypeDetails()

Action

  • Purpose: Action - returns action currently to be taken for this object ("create", "update", or "delete")

  • Syntax: Action = "create"

  • Example: Although action could be used within other functions such as case or if, its typical use will be for a condition. In this case we will set the UPN only on create

Target Attribute    : userPrincipalName

Value        : userPrincipalName

Condition    : action = "Create"

result

  • Purpose: Returns the calculated mapped value of the given attributeName (must be a string)

  • Syntax: result("attributeName")

  • Example: Result is used to gather the value of a mapping which contains a function. This example gathers the results of what the function of the "mail" attribute will be the default value/function for the mail attribute is if(GetObjectClass()="group", ReplaceDomain(WindowsEmailAddress, Profile.TargetDomain), WindowsEmailAddress). The alternative for using result("mail") would be to use the entire function which is present in the mail attribute mapping. The result command allows you to link more complex functions.

Target Attribute    : proxyAddresses

Value        :
GetProxyAddresses(result("mail"), LegacyExchangeDN, result("legacyExchangeDN"))

Condition    : Null

Target.HasCreateStamp

  • Purpose    : This value is an internal value which determines if Directory Sync created the object being synchronized. This value verifies the "created by Dirsync" text is present on the correct attribute for the target object type.  

  • Syntax    :  Target.HasCreateStamp

  • Example: You want to set the UserAccountControl value for only objects created by Directory Sync.

Target Attribute    : userAccountControl

Value        : GetUserAccountControl()

Condition    : Action = "create" or (Action = "update" and Target.HasCreateStamp)

ConvertValue("base64STR", objectGUID)

  • Purpose: This function is used for syncing ms-DS-ConsistencyGuid, which is an attribute that cannot be directly migrated with a standard mapping. This function can also be used to set the ImmutableID on a cloud object when merging with a local AD object as part of a B2B user conversion process.

  • Syntax: ConvertValue("stringtype",objectGUID)

  • The only string type currently available is base64STR

  • Example: ConvertValue("base64STR", objectGUID)

NewGUID()

  • Purpose: This method is used to generate a random GUID

  • Syntax: NewGUID()

  • Example 1: The following expression will set the target object's CN as a random GUID; this is needed to avoid possible name collision as CN is not a unique attribute in Active Directory.

    Select mapping for ‘DistinguishName and double click, enter the below expression under value field:

    GetDn(NewGuid())

  • Example 2: The following expression will set the target object's samAccountName with a random GUID of 20 characters long.

    Select mapping for ‘samAccountName and double click, enter the below expression under value field:

    Left(NewGuid(), 20)

result

These functions are used to gather or set values based on other attributes. Some functions will simply return a value and others will return a computed value based on data found within the parameters or complex attribute data.

Lookupvalue

  • Purpose:  Allow you to lookup a value and replace value with returned value leveraging Data Sets

  • Example:

  • lookupvalue("TFH-OUS",S.Department,getdn(cn))

encodePWD

  • Purpose: Used to encode a string password so that it can be applied to newly created objects in Local AD.  This method should not be used to set the password on a cloud object.

  • Syntax:  EncodePwd(password)

  • Example:

Target Attribute    : unicodePwd

Value        : EncodePwd(Profile.DefaultPassword)

Condition    : Action = "create"

GetAccountDisabled

  • Purpose: Calculates whether to create a target cloud object as enabled or disabled. This does not apply to local AD environments. If the source is a local AD object, the function will read the UserAccountControl and determine if the object should be enabled or disabled.

  • Syntax: GetAccountDisabled()

  • Example:  This example is also a default mapping for cloud environments. It will set the account as enabled or disabled if we create the object, or update an object that was created by Directory Sync. The limit of only updating objects created by Directory Sync can be removed by removing everything in the condition field.

Target Attribute    : AccountDisabled

Value        : GetAccountDisabled()

Condition    : Action = "create" or (Action = "update" and Target.HasCreateStamp)    

ReplaceDomain

  • Purpose: Replaces the domain part of the given attribute with the value specified.

  • Syntax: ReplaceDomain(attribute, value)

  • Attribute can be any attribute that contains an @domain…. Value

  • Value specified can be text or anything that represents a domain name.

  • Example 1:

This example replaces the Domain value of the source userPrincipalName with the domain value selected in the Stage Data step of a workflow

Target Attribute    : userPrincipalName

Value        : ReplaceDomain(S.userPrincipalName, Profile.TargetDomain)

Condition    : Null    

  • Example 2:

This example replaces the Domain value of the source Target address with the domain value selected in the Stage Data step of a workflow

Target Attribute    : TargetAddress

Value        : ReplaceDomain(S.TargetAddress, Profile.TargetDomain)

Condition    : AllowTargetAddress()

GetProxyAddresses

  • Purpose: Create list of Proxy addresses removing any duplicates that are found.

  • Syntax: GetProxyAddresses(SourceProxyAddresses,TargetProxyaddresses, address1,Address2,address3)

  • Example:   Local to Local environment merge Source and Target Proxyaddresses in Target Object

Target Attribute    : Proxyaddresses

Value        :  GetProxyAddresses(S.proxyAddresses, T.proxyAddresses, prefix(Result("mail"), "SMTP:"), prefix(legacyExchangeDN, "x500:"), prefix(Result("legacyExchangeDN"), "x500:"))

Condition    :

  • Example:   Cloud to Cloud environment.  SourceProxyAddresses is set to Null by default to avoid errors adding domains which are not accepted by Office 365.

Target Attribute    : Proxyaddresses

Value        :  GetProxyAddresses(null, T.EmailAddresses, prefix(Result("WindowsEmailAddress"), "SMTP:"), prefix(LegacyExchangeDN, "x500:"))

Condition    :

GetLegacyExchangeDN

  • Purpose: Generate a legacyExchangeDN value using the given exchange org and cn.

  • Syntax: GetLegacyExchangeDN(exchangeOrg, cn)

  • Example: Set the legacy exchange DN for a user in the target

Target Attribute    : legacyExchangeDN

Value        : GetLegacyExchangeDN(Target.ExchangeOrg, ObjectId)

Condition    : Null

GetObjectClass

  • Purpose: Calculates the objectClass from profile settings and the source or target object's class

  • Syntax: GetObjectClass()

  • Example:  Add (contact) to the end of DisplayName if the target object is a contact, if not a contact set same as the source.

Target Attribute    : DisplayName

Value        : if(GetObjectClass()="contact", S.DisplayName+" (Contact)", S.DisplayName)

Condition    :

GetTargetAddress

  • Purpose: Calculates targetAddress, by using source primary SMTP, mail, or userPrincipalName

  • Syntax: GetTargetAddress()

  • Example:  Set the target address for a user with the following attributes

  • UPN Mail attribute first.m.last@domain.com

  • Primary SMTP address first.last@domain.com

  • UPN first.last@domain.com

Target Attribute    : targetAddress

Value        : GetTargetAddress()

Condition    :

  This will result in the value of SMTP being used.

GetRecipientTypeDetails

  • Purpose: Determines the correct value for RecipientTypeDetails or msExchRecipientTypeDetails

  • Syntax: GetRecipientTypeDetails()

Action

  • Purpose: Action - returns action currently to be taken for this object ("create", "update", or "delete")

  • Syntax: Action = "create"

  • Example: Although action could be used within other functions such as case or if, its typical use will be for a condition. In this case we will set the UPN only on create

Target Attribute    : userPrincipalName

Value        : userPrincipalName

Condition    : action = "Create"

result

  • Purpose: Returns the calculated mapped value of the given attributeName (must be a string)

  • Syntax: result("attributeName")

  • Example: Result is used to gather the value of a mapping which contains a function. This example gathers the results of what the function of the "mail" attribute will be the default value/function for the mail attribute is if(GetObjectClass()="group", ReplaceDomain(WindowsEmailAddress, Profile.TargetDomain), WindowsEmailAddress). The alternative for using result("mail") would be to use the entire function which is present in the mail attribute mapping. The result command allows you to link more complex functions.

Target Attribute    : proxyAddresses

Value        :
GetProxyAddresses(result("mail"), LegacyExchangeDN, result("legacyExchangeDN"))

Condition    : Null

Target.HasCreateStamp

  • Purpose    : This value is an internal value which determines if Directory Sync created the object being synchronized. This value verifies the "created by Dirsync" text is present on the correct attribute for the target object type.  

  • Syntax    :  Target.HasCreateStamp

  • Example: You want to set the UserAccountControl value for only objects created by Directory Sync.

Target Attribute    : userAccountControl

Value        : GetUserAccountControl()

Condition    : Action = "create" or (Action = "update" and Target.HasCreateStamp)

ConvertValue("base64STR", objectGUID)

  • Purpose: This function is used for syncing ms-DS-ConsistencyGuid, which is an attribute that cannot be directly migrated with a standard mapping. This function can also be used to set the ImmutableID on a cloud object when merging with a local AD object as part of a B2B user conversion process.

  • Syntax: ConvertValue("stringtype",objectGUID)

  • The only string type currently available is base64STR

  • Example: ConvertValue("base64STR", objectGUID)

NewGUID()

  • Purpose: This method is used to generate a random GUID

  • Syntax: NewGUID()

  • Example 1: The following expression will set the target object's CN as a random GUID; this is needed to avoid possible name collision as CN is not a unique attribute in Active Directory.

    Select mapping for ‘DistinguishName and double click, enter the below expression under value field:

    GetDn(NewGuid())

  • Example 2: The following expression will set the target object's samAccountName with a random GUID of 20 characters long.

    Select mapping for ‘samAccountName and double click, enter the below expression under value field:

    Left(NewGuid(), 20)

Target.HasCreateStamp

These functions are used to gather or set values based on other attributes. Some functions will simply return a value and others will return a computed value based on data found within the parameters or complex attribute data.

Lookupvalue

  • Purpose:  Allow you to lookup a value and replace value with returned value leveraging Data Sets

  • Example:

  • lookupvalue("TFH-OUS",S.Department,getdn(cn))

encodePWD

  • Purpose: Used to encode a string password so that it can be applied to newly created objects in Local AD.  This method should not be used to set the password on a cloud object.

  • Syntax:  EncodePwd(password)

  • Example:

Target Attribute    : unicodePwd

Value        : EncodePwd(Profile.DefaultPassword)

Condition    : Action = "create"

GetAccountDisabled

  • Purpose: Calculates whether to create a target cloud object as enabled or disabled. This does not apply to local AD environments. If the source is a local AD object, the function will read the UserAccountControl and determine if the object should be enabled or disabled.

  • Syntax: GetAccountDisabled()

  • Example:  This example is also a default mapping for cloud environments. It will set the account as enabled or disabled if we create the object, or update an object that was created by Directory Sync. The limit of only updating objects created by Directory Sync can be removed by removing everything in the condition field.

Target Attribute    : AccountDisabled

Value        : GetAccountDisabled()

Condition    : Action = "create" or (Action = "update" and Target.HasCreateStamp)    

ReplaceDomain

  • Purpose: Replaces the domain part of the given attribute with the value specified.

  • Syntax: ReplaceDomain(attribute, value)

  • Attribute can be any attribute that contains an @domain…. Value

  • Value specified can be text or anything that represents a domain name.

  • Example 1:

This example replaces the Domain value of the source userPrincipalName with the domain value selected in the Stage Data step of a workflow

Target Attribute    : userPrincipalName

Value        : ReplaceDomain(S.userPrincipalName, Profile.TargetDomain)

Condition    : Null    

  • Example 2:

This example replaces the Domain value of the source Target address with the domain value selected in the Stage Data step of a workflow

Target Attribute    : TargetAddress

Value        : ReplaceDomain(S.TargetAddress, Profile.TargetDomain)

Condition    : AllowTargetAddress()

GetProxyAddresses

  • Purpose: Create list of Proxy addresses removing any duplicates that are found.

  • Syntax: GetProxyAddresses(SourceProxyAddresses,TargetProxyaddresses, address1,Address2,address3)

  • Example:   Local to Local environment merge Source and Target Proxyaddresses in Target Object

Target Attribute    : Proxyaddresses

Value        :  GetProxyAddresses(S.proxyAddresses, T.proxyAddresses, prefix(Result("mail"), "SMTP:"), prefix(legacyExchangeDN, "x500:"), prefix(Result("legacyExchangeDN"), "x500:"))

Condition    :

  • Example:   Cloud to Cloud environment.  SourceProxyAddresses is set to Null by default to avoid errors adding domains which are not accepted by Office 365.

Target Attribute    : Proxyaddresses

Value        :  GetProxyAddresses(null, T.EmailAddresses, prefix(Result("WindowsEmailAddress"), "SMTP:"), prefix(LegacyExchangeDN, "x500:"))

Condition    :

GetLegacyExchangeDN

  • Purpose: Generate a legacyExchangeDN value using the given exchange org and cn.

  • Syntax: GetLegacyExchangeDN(exchangeOrg, cn)

  • Example: Set the legacy exchange DN for a user in the target

Target Attribute    : legacyExchangeDN

Value        : GetLegacyExchangeDN(Target.ExchangeOrg, ObjectId)

Condition    : Null

GetObjectClass

  • Purpose: Calculates the objectClass from profile settings and the source or target object's class

  • Syntax: GetObjectClass()

  • Example:  Add (contact) to the end of DisplayName if the target object is a contact, if not a contact set same as the source.

Target Attribute    : DisplayName

Value        : if(GetObjectClass()="contact", S.DisplayName+" (Contact)", S.DisplayName)

Condition    :

GetTargetAddress

  • Purpose: Calculates targetAddress, by using source primary SMTP, mail, or userPrincipalName

  • Syntax: GetTargetAddress()

  • Example:  Set the target address for a user with the following attributes

  • UPN Mail attribute first.m.last@domain.com

  • Primary SMTP address first.last@domain.com

  • UPN first.last@domain.com

Target Attribute    : targetAddress

Value        : GetTargetAddress()

Condition    :

  This will result in the value of SMTP being used.

GetRecipientTypeDetails

  • Purpose: Determines the correct value for RecipientTypeDetails or msExchRecipientTypeDetails

  • Syntax: GetRecipientTypeDetails()

Action

  • Purpose: Action - returns action currently to be taken for this object ("create", "update", or "delete")

  • Syntax: Action = "create"

  • Example: Although action could be used within other functions such as case or if, its typical use will be for a condition. In this case we will set the UPN only on create

Target Attribute    : userPrincipalName

Value        : userPrincipalName

Condition    : action = "Create"

result

  • Purpose: Returns the calculated mapped value of the given attributeName (must be a string)

  • Syntax: result("attributeName")

  • Example: Result is used to gather the value of a mapping which contains a function. This example gathers the results of what the function of the "mail" attribute will be the default value/function for the mail attribute is if(GetObjectClass()="group", ReplaceDomain(WindowsEmailAddress, Profile.TargetDomain), WindowsEmailAddress). The alternative for using result("mail") would be to use the entire function which is present in the mail attribute mapping. The result command allows you to link more complex functions.

Target Attribute    : proxyAddresses

Value        :
GetProxyAddresses(result("mail"), LegacyExchangeDN, result("legacyExchangeDN"))

Condition    : Null

Target.HasCreateStamp

  • Purpose    : This value is an internal value which determines if Directory Sync created the object being synchronized. This value verifies the "created by Dirsync" text is present on the correct attribute for the target object type.  

  • Syntax    :  Target.HasCreateStamp

  • Example: You want to set the UserAccountControl value for only objects created by Directory Sync.

Target Attribute    : userAccountControl

Value        : GetUserAccountControl()

Condition    : Action = "create" or (Action = "update" and Target.HasCreateStamp)

ConvertValue("base64STR", objectGUID)

  • Purpose: This function is used for syncing ms-DS-ConsistencyGuid, which is an attribute that cannot be directly migrated with a standard mapping. This function can also be used to set the ImmutableID on a cloud object when merging with a local AD object as part of a B2B user conversion process.

  • Syntax: ConvertValue("stringtype",objectGUID)

  • The only string type currently available is base64STR

  • Example: ConvertValue("base64STR", objectGUID)

NewGUID()

  • Purpose: This method is used to generate a random GUID

  • Syntax: NewGUID()

  • Example 1: The following expression will set the target object's CN as a random GUID; this is needed to avoid possible name collision as CN is not a unique attribute in Active Directory.

    Select mapping for ‘DistinguishName and double click, enter the below expression under value field:

    GetDn(NewGuid())

  • Example 2: The following expression will set the target object's samAccountName with a random GUID of 20 characters long.

    Select mapping for ‘samAccountName and double click, enter the below expression under value field:

    Left(NewGuid(), 20)

ConvertValue("base64STR", objectGUID)

These functions are used to gather or set values based on other attributes. Some functions will simply return a value and others will return a computed value based on data found within the parameters or complex attribute data.

Lookupvalue

  • Purpose:  Allow you to lookup a value and replace value with returned value leveraging Data Sets

  • Example:

  • lookupvalue("TFH-OUS",S.Department,getdn(cn))

encodePWD

  • Purpose: Used to encode a string password so that it can be applied to newly created objects in Local AD.  This method should not be used to set the password on a cloud object.

  • Syntax:  EncodePwd(password)

  • Example:

Target Attribute    : unicodePwd

Value        : EncodePwd(Profile.DefaultPassword)

Condition    : Action = "create"

GetAccountDisabled

  • Purpose: Calculates whether to create a target cloud object as enabled or disabled. This does not apply to local AD environments. If the source is a local AD object, the function will read the UserAccountControl and determine if the object should be enabled or disabled.

  • Syntax: GetAccountDisabled()

  • Example:  This example is also a default mapping for cloud environments. It will set the account as enabled or disabled if we create the object, or update an object that was created by Directory Sync. The limit of only updating objects created by Directory Sync can be removed by removing everything in the condition field.

Target Attribute    : AccountDisabled

Value        : GetAccountDisabled()

Condition    : Action = "create" or (Action = "update" and Target.HasCreateStamp)    

ReplaceDomain

  • Purpose: Replaces the domain part of the given attribute with the value specified.

  • Syntax: ReplaceDomain(attribute, value)

  • Attribute can be any attribute that contains an @domain…. Value

  • Value specified can be text or anything that represents a domain name.

  • Example 1:

This example replaces the Domain value of the source userPrincipalName with the domain value selected in the Stage Data step of a workflow

Target Attribute    : userPrincipalName

Value        : ReplaceDomain(S.userPrincipalName, Profile.TargetDomain)

Condition    : Null    

  • Example 2:

This example replaces the Domain value of the source Target address with the domain value selected in the Stage Data step of a workflow

Target Attribute    : TargetAddress

Value        : ReplaceDomain(S.TargetAddress, Profile.TargetDomain)

Condition    : AllowTargetAddress()

GetProxyAddresses

  • Purpose: Create list of Proxy addresses removing any duplicates that are found.

  • Syntax: GetProxyAddresses(SourceProxyAddresses,TargetProxyaddresses, address1,Address2,address3)

  • Example:   Local to Local environment merge Source and Target Proxyaddresses in Target Object

Target Attribute    : Proxyaddresses

Value        :  GetProxyAddresses(S.proxyAddresses, T.proxyAddresses, prefix(Result("mail"), "SMTP:"), prefix(legacyExchangeDN, "x500:"), prefix(Result("legacyExchangeDN"), "x500:"))

Condition    :

  • Example:   Cloud to Cloud environment.  SourceProxyAddresses is set to Null by default to avoid errors adding domains which are not accepted by Office 365.

Target Attribute    : Proxyaddresses

Value        :  GetProxyAddresses(null, T.EmailAddresses, prefix(Result("WindowsEmailAddress"), "SMTP:"), prefix(LegacyExchangeDN, "x500:"))

Condition    :

GetLegacyExchangeDN

  • Purpose: Generate a legacyExchangeDN value using the given exchange org and cn.

  • Syntax: GetLegacyExchangeDN(exchangeOrg, cn)

  • Example: Set the legacy exchange DN for a user in the target

Target Attribute    : legacyExchangeDN

Value        : GetLegacyExchangeDN(Target.ExchangeOrg, ObjectId)

Condition    : Null

GetObjectClass

  • Purpose: Calculates the objectClass from profile settings and the source or target object's class

  • Syntax: GetObjectClass()

  • Example:  Add (contact) to the end of DisplayName if the target object is a contact, if not a contact set same as the source.

Target Attribute    : DisplayName

Value        : if(GetObjectClass()="contact", S.DisplayName+" (Contact)", S.DisplayName)

Condition    :

GetTargetAddress

  • Purpose: Calculates targetAddress, by using source primary SMTP, mail, or userPrincipalName

  • Syntax: GetTargetAddress()

  • Example:  Set the target address for a user with the following attributes

  • UPN Mail attribute first.m.last@domain.com

  • Primary SMTP address first.last@domain.com

  • UPN first.last@domain.com

Target Attribute    : targetAddress

Value        : GetTargetAddress()

Condition    :

  This will result in the value of SMTP being used.

GetRecipientTypeDetails

  • Purpose: Determines the correct value for RecipientTypeDetails or msExchRecipientTypeDetails

  • Syntax: GetRecipientTypeDetails()

Action

  • Purpose: Action - returns action currently to be taken for this object ("create", "update", or "delete")

  • Syntax: Action = "create"

  • Example: Although action could be used within other functions such as case or if, its typical use will be for a condition. In this case we will set the UPN only on create

Target Attribute    : userPrincipalName

Value        : userPrincipalName

Condition    : action = "Create"

result

  • Purpose: Returns the calculated mapped value of the given attributeName (must be a string)

  • Syntax: result("attributeName")

  • Example: Result is used to gather the value of a mapping which contains a function. This example gathers the results of what the function of the "mail" attribute will be the default value/function for the mail attribute is if(GetObjectClass()="group", ReplaceDomain(WindowsEmailAddress, Profile.TargetDomain), WindowsEmailAddress). The alternative for using result("mail") would be to use the entire function which is present in the mail attribute mapping. The result command allows you to link more complex functions.

Target Attribute    : proxyAddresses

Value        :
GetProxyAddresses(result("mail"), LegacyExchangeDN, result("legacyExchangeDN"))

Condition    : Null

Target.HasCreateStamp

  • Purpose    : This value is an internal value which determines if Directory Sync created the object being synchronized. This value verifies the "created by Dirsync" text is present on the correct attribute for the target object type.  

  • Syntax    :  Target.HasCreateStamp

  • Example: You want to set the UserAccountControl value for only objects created by Directory Sync.

Target Attribute    : userAccountControl

Value        : GetUserAccountControl()

Condition    : Action = "create" or (Action = "update" and Target.HasCreateStamp)

ConvertValue("base64STR", objectGUID)

  • Purpose: This function is used for syncing ms-DS-ConsistencyGuid, which is an attribute that cannot be directly migrated with a standard mapping. This function can also be used to set the ImmutableID on a cloud object when merging with a local AD object as part of a B2B user conversion process.

  • Syntax: ConvertValue("stringtype",objectGUID)

  • The only string type currently available is base64STR

  • Example: ConvertValue("base64STR", objectGUID)

NewGUID()

  • Purpose: This method is used to generate a random GUID

  • Syntax: NewGUID()

  • Example 1: The following expression will set the target object's CN as a random GUID; this is needed to avoid possible name collision as CN is not a unique attribute in Active Directory.

    Select mapping for ‘DistinguishName and double click, enter the below expression under value field:

    GetDn(NewGuid())

  • Example 2: The following expression will set the target object's samAccountName with a random GUID of 20 characters long.

    Select mapping for ‘samAccountName and double click, enter the below expression under value field:

    Left(NewGuid(), 20)

Documents connexes

The document was helpful.

Sélectionner une évaluation

I easily found the information I needed.

Sélectionner une évaluation