Microsoft Entra Suite Tech Accelerator
Aug 14 2024, 07:00 AM - 09:30 AM (PDT)
Microsoft Tech Community
SOLVED

Prepend a constant value to an existing attribute EmployeeID in the Sync rule - AD Connect

Brass Contributor

We need to create a new custom attribute in Azure AD Connect for syncing, call it OneTrustEmployeeID and populate it like:-
OneTrustEmployeeID = "ISO Code of Country" + EmployeeID

We are getting an "Append function is undefined" error by the use of this expression in the transformation tab of the sync rules:-

Append([EmployeeID], "+91")

3 Replies
I am confused, Append Adds to the End of the String, so you would be creating Employee ID + "ISO Code" - Wouldn't you need Join("","+91",[EmployeeID]) anyways?

@juliansperling Thanks so much for looking at this. Guess you are right, I took Append as Prepend. However, it was giving this error and I've tried Join, it errors out in evaluation later. All users got sync general failure. I've modified the transformation in the User Common rule, should it be done on a different rule? Would that matter??

best response confirmed by Ajay_Joshi (Brass Contributor)
Solution
Resolved by using the following expression:-

CStr("IN") & [employeeID]
or
IIF(IsNullOrEmpty([employeeID]),NULL,CStr("IN") & [employeeID])

If concatenating a number with a String type Attribute value:-

CStr(91) & [employeeID]
or
IIF(IsNullOrEmpty([employeeID]),NULL,CStr(91) & [employeeID])
1 best response

Accepted Solutions
best response confirmed by Ajay_Joshi (Brass Contributor)
Solution
Resolved by using the following expression:-

CStr("IN") & [employeeID]
or
IIF(IsNullOrEmpty([employeeID]),NULL,CStr("IN") & [employeeID])

If concatenating a number with a String type Attribute value:-

CStr(91) & [employeeID]
or
IIF(IsNullOrEmpty([employeeID]),NULL,CStr(91) & [employeeID])

View solution in original post