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

Prince Chauhan 20 Reputation points
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

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,732 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,955 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. James Hamil 26,116 Reputation points Microsoft Employee
    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


  2. Prince Chauhan 20 Reputation points
    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 "/" ?

    0 comments No comments

  3. Prince Chauhan 20 Reputation points
    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 "/" ?

    0 comments No comments

  4. Prince Chauhan 20 Reputation points
    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])

    0 comments No comments

Your answer

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