A Forum reader recently asked:

“I’m using IDM 3.5 and looking for the best method to generate a CN value that includes:

  • A maximum length of 8 characters
  • The first character of the given name
  • The first character of the initials
  • The surname

The tie-breaker rule is to add a number to the end, and when adding a number to the end it must still be a maximum of 8 characters.”

And here’s the response from Father Ramon …


The example below will give you a 1-digit counter after an initial collision. If you want a counter even when no collision occurs, then get rid of the first pattern. If you want more than one digit, change the counter digits and adjust the substring length in the pattern to match.

<do-set-local-variable name="proposed" scope="policy">
     <token-substring length="8">
       <token-substring length="1">
         <token-attr name="Given Name"/>
       <token-substring length="1">
         <token-attr name="Inititials"/>
       <token-attr name="Surname"/>
     <token-unique-name counter-digits="1" counter-pattern="last" 
counter-use="always" name="CN" on-unavailable="error">
         <token-local-variable name="proposed"/>
         <token-substring length="7">
           <token-local-variable name="proposed"/>

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Leave a Reply

No Comments
May 23, 2007
6:50 am
Active Directory Authentication Automation Cloud Computing Cloud Security Configuration Customizing Data Breach DirXML Drivers End User Management Identity Manager Importing-Exporting / ICE/ LDIF Intelligent Workload Management IT Security Knowledge Depot LDAP Monitoring Open Enterprise Server Passwords Reporting Secure Access Supported Troubleshooting Workflow