SelectUniqueValue Error - This function cannot be nested

Michael Liben 261 Reputation points
2022-10-25T16:49:06.02+00:00

I am trying to provision users following two naming conventions. If users are in a certain division, they follow one convention which uses their employee ID. If they are in another division, they get a unique lookup based on their first and last name. I am trying using the following expression, but I get the error, "This function cannot be nested : SelectUniqueValue"

Switch([divisionId],"",
"ABC",Mid([personIdExternal],3,9),
"DEF",Mid([personIdExternal],3,9),
"XYZ",SelectUniqueValue(
Mid(NormalizeDiacritics(StripSpaces(Join("", Mid([PreferredName], 1, 1), [LastName]))),1,12),
Mid(NormalizeDiacritics(StripSpaces(Join("", Mid([PreferredName], 1, 2), [LastName]))),1,12)
)
)

Appreciate some guidance on developing an acceptable expression.

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,771 Reputation points
    2022-10-26T14:55:59.84+00:00

    Hello there,

    Can you make sure that you've followed the rules for implementing this function?

    This function cannot be applied to attributes that have a matching precedence.
    This function is only meant to be used for entry creations. When using it with an attribute, set the Apply Mapping property to Only during object creation.
    This function is currently only supported for "Workday to Active Directory User Provisioning". It cannot be used with other provisioning applications.

    Similar discussion can be found on this thread https:// github.com/MicrosoftDocs/azure-docs/issues/47786

    --------------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer--


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.