Closed sergiopadure closed 7 months ago
@sergiopadure It would be great if you could add a link to the documentation you are following for these steps? This would help us redirect the issue to the appropriate team. Thanks!!
@sergiopadure It would be great if you could add a link to the documentation you are following for these steps? This would help us redirect the issue to the appropriate team. Thanks!!
Hi, I've been using this as reference: https://learn.microsoft.com/en-us/entra/identity/app-provisioning/functions-for-customizing-application-data
But going a bit beyond what's indicated there because of our specific needs.
@sergiopadure Thanks for your feedback! We will investigate and update as appropriate.
@sergiopadure
Hello! It seems like you are still trying to generate unique email addresses for each user based on their employeeClass value, but the expressions you have tried so far are not giving you the desired result.
To generate a unique email address for each user based on their employeeClass value, you can try using the following expression:
Join("@", NormalizeDiacritics(StripSpaces(ToLower(Join(".", Coalesce([preferredName], [firstName]), Coalesce([preferredSurname], [lastName]))))), Switch([employeeClass], "CORP", Join("", [personIdExternal], "@contoso.com"), "123", SelectUniqueValue(Join(".", Coalesce([preferredName], [firstName]), Coalesce([preferredSurname], [lastName]), "a", "@contoso.com"), Join(".", Coalesce([preferredName], [firstName]), Coalesce([preferredSurname], [lastName]), "b", "@contoso.com")), "124", SelectUniqueValue(Join(".", Coalesce([preferredName], [firstName]), Coalesce([preferredSurname], [lastName]), "a", "@external.contoso.com"), Join(".", Coalesce([preferredName], [firstName]), Coalesce([preferredSurname], [lastName]), "b", "@external.contoso.com"))) This expression uses the Switch function to determine the domain based on the value of employeeClass, and then concatenates it with the email address generated by the Join function. For the "123" and "124" cases, it uses the SelectUniqueValue function to generate a unique email address based on the user's name and a suffix.
Let me know if this helps!
@AjayBathini-MSFT I don't think a Copilot/ChatGPT answer would help here, especially since that was one of the first things I tried myself...
As indicated within my post, SelectUniqueValue cannot be nested, so the AI-generated expression you've provided wouldn't work.
@sergiopadure Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.
This function SelectUniqueValue can not be nested, as indicated in documentation.
This function SelectUniqueValue can not be nested, as indicated in documentation.
* This function must be at the top-level and cannot be nested.
As indicated in the message I'm very aware of that, which is why I was looking for an additional solution, but nesting switch doesn't work either as switch is not outputting the array of strings it's supposed to but rather an array of arrays which then SelectUniqueValue cannot parse...
Hi,
Has anyone found a solution to the need of nesting SelectUniqueValue?
We need to be able to select the domain of the email address of the provisioned user depending on the value of employeeClass on the side of SuccessFactors.
I've tested this:
But returns an error saying that SelectUniqueValue cannot be nested.
So I rotated the usage of the functions to this:
But this returns an array of values instead of the first Unique:
["name.surname@external.contoso.com","name.surname.a@external.contoso.com","name.surname.b@external.contoso.com"]
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.