Problem with username generator

Good morning,

We are trying to create a “username generator” transformation for a provisioning policy with the aim of creating a unique alias during provisioning.

This is our first time doing it, and we simply tested uploading the policy code to the tenant using the ISC plugin for Visual Studio, and it uploads correctly:


The problem is that when importing identities, the code is partially erased:

imagen

and does not do what it should (it’s a test where it should simply add an @ + lastName). Is there something we are doing wrong?

Thanks!

You might be experiencing this BUG: Bug - Create Account Provisioning Policy - Feedback / Bugs - SailPoint Developer Community
That if you go back into the GUI and make a change, the code disappears from VSC.

Phil

2 Likes

@phil_awlings thank you very much for the response, it seems that the problem is indeed exactly that, and it is something recent that the technical support team is trying to resolve. We hope it gets fixed as soon as possible.

Hi @smenendezp ,

If you just doing everything via VSC and don’t go back into the GUI, then you will be okay to continue with your development/testing

1 Like

Alright, we are testing this and now it doesn’t get erased, but it still doesn’t display what we want. According to the first photo I uploaded to this thread, it should show the text “@[corresponding_lastName]” in the displayName value, right? Because it still doesn’t show it.

Thank you very much, @phil_awlings !

Hey @smenendezp
Aren’t you trying to generate this alias to be unique? Perhaps you may want a counter at the end of the last name in scenarios where 2 or more people have the same last name.

Why don’t you give this a try:

{
  "name": "Alias_test",
  "transform": {
    "type": "usernameGenerator", 
    "attributes": {
      "patterns": [
        "$ln${uniqueCounter}"
      ],
      "ln": {
        "type": "identityAttribute",
        "attributes": {
          "name": "lastName"
        }
      }
    }
  },
  "attributes": {
    "cloudMaxSize": "100",
    "cloudMaxUniqueChecks": "9",
    "cloudRequired": "true" 
  },
  "isRequired": true,
  "type": "string",
  "isMultiValued": false
}
2 Likes

Hello, @sushant1

Indeed, my intention is to do something more complex, but first I wanted to try something simple to see if I was doing it correctly. As mentioned above, there is a reported error. We will try to perform tests and gradually increase the complexity of what we need, working exclusively from ISC Visual Studio to avoid the error until it is fixed by SailPoint.

Thank you!

@smenendezp

Is there an attribute called “Alias_test” on the source that you are creating?
Because that is what you are trying to populate with this transform.

Phil

No, but I was associating it with the “displayName” attribute in the graphical interface (it’s associated, I didn’t go back in and the error that erased the code didn’t occur again). I assumed that the value of what I am trying would appear in the “displayName” attribute:

7eecc6a8fef65dd8761fc51b96fa75b5b7190099_2_517x301

This is my first time doing this, so I am learning. I am going to change “Alias_test” to an attribute that exists to see if it changes as I want.

Thanks again, @phil_awlings!

I have tried it and it doesn’t work, maybe I am doing something wrong by doing it from the ISC plugin of Visual Studio. I set the name to “cloudLifecycleState,” which is an existing identity attribute. In “attributeName” within “identityAttribute” I am using “lastname,” which is also an identity attribute. After provisioning from the source, nothing is generated (it should display “@[corresponding_lastName]” but it shows the usual value):

I understand that even if I am not using the correct values, this is just a simulation to see if the information is created correctly and to learn how it works.

Thanks!

          {
            "name": "sAMAccountName", #source.attribute
            "transform": {
                "type": "rule",
                "attributes": {
                    "name": "Create Unique LDAP Attribute"
                }
            },
            "attributes": {
                "template": "$(samaccountnameCalculate)$(uniqueCounter)",
                "cloudMaxUniqueChecks": "10",
                "cloudMaxSize": "20",
                "cloudRequired": "true"
            },
            "isRequired": false,
            "type": "string",
            "isMultiValued": false
        },

In the above code I am creating an account in AD (doesn’t matter where).
The value “name” is a field in AD (saMAccountName) that is being populated by the CREATE profile.
It appears that you are trying to populate an Identity.Attribute (cloudLifecycleState) rather than a Source.attribute. You need to choose an attribute on the source that you are creating to apply that transform to.

Or for a very simple transform where I want the Identity.Attribute “displayName” to be mapped to Source.Attribute that I am creating:

        {
            "name": "displayName", #source.attribute
            "transform": {
                "type": "identityAttribute",
                "attributes": {
                    "name": "displayName" #identity.attribute
                }
            },
            "attributes": {},
            "isRequired": false,
            "type": "string",
            "isMultiValued": false
        },
1 Like

Good morning, it still doesn’t work. We have tried with different attributes and nothing. For example:

imagen

Hi,

“attributeName” should be “name” in the innermost nested transform { }

1 Like

as per the above, this is how it should look

                         
 "type": "identityAttribute",
 "attributes": {
    "name": "lastName"
  }

@phil_awlings hanks @shaileeM and @phil_awlings

We have tried several combinations and it still doesn’t work. We also tried with ‘name’ and it doesn’t work. Additionally, we tried with ‘lastname’ and ‘lastName’ to rule out all options:

imagen

imagen

Lets work from the beginning and start with a static value like this:

          {
            "name": "Account",
            "description": null,
            "usageType": "CREATE",
            "fields": [
              {
                "name": "distinguishedName",
                "transform": {
                  "type": "static",
                  "attributes": {
                    "value": "Test User"
                  }
                },
                "attributes": {
                  "cloudRequired": "true"
                },
                "isRequired": false,
                "type": "string",
                "isMultiValued": false
              }
}

it is not working, but we believe it is due to another error we are checking. Thanks for all the help!

Hopefully, the problem that started this thread and has been reported for two weeks will be resolved soon.

Regards.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.