Share via

How to remove the Specific Characters from User attribute value via AAD connect Mapping under Synch rule editor

Anonymous
2024-11-11T11:51:35.1833333+00:00

Hi All,

Hope all are doing great!!

We have attribute named (On-prem AD) Division whose value is "contigent employee/Technician" and we are looking to Map the (On-prem AD) division Value with Entra ID attribute Employee Org Data but we are looking to remove the Specific charater from the value "/Technician" while we do mapping under synch rule editor in AAD connect from AD to EntraID.

Example Division = contigent employee/Technician

During Mapping Remove "/Technician"

On EntraID Employee Org Data = contigent employee

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Microsoft Security | Microsoft Entra | Microsoft Entra External ID
0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2024-11-12T12:54:40.3333333+00:00

    Hi James,

    We are able to trim the value by using the below expression.

    IIF(InStr([division], "/") > 0, Left([division], InStr([division], "/") - 1), [division])

    Was this answer helpful?

    0 comments No comments

  2. Anonymous
    2024-11-12T01:16:23.01+00:00

    Hi James,

    Thanks for the reply.

    But we have multiple values after "/" (Technician, Fitter, Prod Worker, Contingent worker etc). can i use "/" instead of "/Technician" in the expresssion so we can remove the any values after the "/" ?

    Was this answer helpful?

    0 comments No comments

  3. Anonymous
    2024-11-12T01:16:08.4466667+00:00

    Hi James,

    Thanks for the reply.

    But we have multiple values after "/" (Technician, Fitter, Prod Worker, Contingent worker etc). can i use "/" instead of "/Technician" in the expresssion so we can remove the any values after the "/" ?

    Was this answer helpful?

    0 comments No comments

  4. Anonymous
    2024-11-11T19:08:37.35+00:00

    Hi @Prince Chauhan , in AAD connect, go to the Syncrnization Rules Edutor. In the editor, either create a new rule or edit an existing one that syncs the "Division" attribute. Select "Inbound Synchronization Rule".

    Go to the "Transformations" tab and add a new transformation (or edit the existing one for "Division"). Choose "Expression" for the FlowType. In the source field, use this expression to remove "/Technician":

    IIF(InStr([division], "/Technician") > 0, Left([division], InStr([division], "/Technician") - 1), [division])
    

    This expression checks if "/Technician" is in the "Division" value. If it is, it keeps everything before "/Technician". If not, it just uses the original value.

    Set the target to "employeeOrgData" in Entra ID.

    Save your changes and make sure the rule is applied.

    Run a full sync to see the changes in action. Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.