Use this expression mapping function to remove the leading zeros.
So, if your WorkerID is 0000A2309, then this expression will emit A2309.
Replace([WorkerID], , "(?<leadingZeros>^0+)(?<actualValue>[a-zA-Z0-9]+)", , "${actualValue}", ,)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
We are working on Workday to on-premise AD integration through entra provisioning service solution. We need to remove leading zeros from the "employeeId" attribute because Workday has leading zeros present but on-premise AD doesn’t have leading zeros. My goal is to configure the mapping of the "employeeId" attribute so that only leading zeros are removed during the synchronization.
I tried setting the mapping type to "Expression mapping "and using regular expressions to remove the leading zeros, but my attempts haven't worked as expected.
Here are the expressions I tried:
How can I correctly remove only the leading zeros from the "employeeId" attribute during the sync to on-premise AD? Thanks.
Use this expression mapping function to remove the leading zeros.
So, if your WorkerID is 0000A2309, then this expression will emit A2309.
Replace([WorkerID], , "(?<leadingZeros>^0+)(?<actualValue>[a-zA-Z0-9]+)", , "${actualValue}", ,)
Hello @Ghebremichael, Rahwa
Thank you for posting your query on Microsoft Q&A.
Refer document: https://learn.microsoft.com/en-us/entra/identity/app-provisioning/functions-for-customizing-application-data
Please note that if you are creating an expression, it will not remove the extra zero from the attribute originating from Workday. The Expression Builder is not designed to address this issue of eliminating the extra zero.
Reviewing standard regular expression instructions can be useful if you're unclear about the regular expression syntax supported by Workday or Azure AD. You may test and debug your regular expressions using websites such as regex101: build, test, and debug regex
To guarantee that just the leading zeros are eliminated, this slightly altered expression matches one or more zeros at the beginning of the string
Replace([WorkerID], , "(?<leadingZeros>^0+)(?<actualValue>[a-zA-Z0-9]+)", , "${actualValue}", ,)
I hope this clarifies things. Please contact us if you have any additional questions.
If this answers your query, do click Accept Answer and Yes for "Was this answer helpful". And, if you have any further query do let us know.
Best regards,
Sakshi Devkante