none
Generate Unique Value - MIMWAL Activity - ValueViolatesUniqueness error RRS feed

  • Question

  • Hi All,

    I installed MIMWAL to demonstrate the unique AccountName generation for AD provisioning. Below are the config values I have supplied in the activity

    Target for Generated Value: [//Target/AccountName]

    Conflict Filter: /Person[AccountName = [//Value]]

    Query LDAP for conflicts: Checked

    LDAP Queries: ' (&(Objectclass=user)(ObjectCategory=Person)(sAMAccountName=[//Value]))'

    Uniqueness key seed: 2

    Value Expression1: UpperCase(Left([//Target/FirstName],1))+[//Target/LastName]

    Value Expression2: UpperCase(Left([//Target/FirstName],1))+[//Target/LastName]+[//UniquenessKey]

    This workflow is added to the AD Provisioning MPR as well. It IS creating an accountname and updating the user after submitting the create user form.

    However, it does not create the subsequent accountnames if there is a conflict with the accountNames,

    Eg. It creates a JSmith for the user John Smith, but when I create a Joane smith, it fails with  ValueViolatesUniqueness error and does not create JSmith2.

    What am I missing here? Any help is much appreciated. Thanks in advance


    Aravinth Jerry Microsoft Identity Consultant

    Tuesday, June 28, 2016 12:48 AM

All replies

  • Not sure what could be the issue, but typically you'd have single quotes around value lookup in the Conflict filter so that in this case it reads as /Person[AccountName = '[//Value]']. From what you are saying it seems FIM XPath is working without the quotes so not sure where the assumption is in the WAL code if you get this working with quotes.
    Wednesday, June 29, 2016 8:30 AM
    Owner
  • Hi Nilesh,

    Thanks for the reply, yes I know the single quote is missing. if I add the single quote, it gave me another error:

    Event ID 2: System.InvalidOperationException: An Error occurred while enumerating the filter '/Person[AccountName='XXXXX']' (with Object reference not set to an instance error] and

    Event ID 3: System.InvalidOperationException: Invalid token in XPath expression.

    Because I had to finish this off quickly I used classic provisioning code to address this requirement. But I am curious to know what is the reason behind and has anyone faced the same issue.


    Aravinth Jerry Microsoft Identity Consultant

    Friday, July 1, 2016 4:46 AM
  • Hi,

    The only difference I've noted here is on a similar project piece of work where we had to create a unique immutable ID, but we only had one value expression like your second expression.  We didn't have the LDAP conflict query either and stored the generated value in a workflow dictionary to use outside of the first activity.  So the first activity generated the unique immutable ID and the second activity set it on the group in the create phase.  Agree with Nilesh that the XPath conflict filter should be e.g. /Group[ImmutableID = '[//Value]']

    Hope that helps

    Rob

    Wednesday, July 25, 2018 4:33 PM
  • Hi,

    I had the same issue just now and found that removing the extra closing bracket resolved the issue for me. Your's and mine (&(Objectclass=user)(ObjectCategory=Person)(sAMAccountName=[//Value])) should be (&(Objectclass=user)(ObjectCategory=Person)(sAMAccountName=[//Value])

    Regards,

    Friday, November 23, 2018 3:32 PM