Hello,
First, is it possible to have a property pattern required only on a creation, and not on a modification of a user account? This comes into play in a new date field I want to require for new users going forward, but wouldn't necessarily apply to any existing/past accounts.
In such a case, we would suggest creating all new users in a certain OU/Container. Then, you can use two separate Property Patterns, one applied to the OU/Container where you create users, and one more that would apply to all other locations except that OU/Container. This can be used in a combination with a Business Rule that would automatically move all newly created users to the OU you need, say, based on a certain property of the user's account. So, when a user is created, the account is always created in a certain OU, where a certain Property Pattern defines value constraints and generation templates for new users only. Then, after creation, the user will be moved to another OU, where another Property Pattern is applied.
To implement such a solution:
- Modify the Activity Scope of the Property Pattern used for new users so that it would include the OU/Container where you want to create users. For information on how to accomplish this task, see Modifying Property Pattern Activity Scope.
- Modify the Activity Scope of the Property Pattern used for existing users so that it would exclude the OU/Container where you want to create users. For example, you can include All objects in the Activity Scope of the Pattern, and then add one more assignment for the OU/Container where you want to create users and check the Exclude the selection option in the Assignment Options dialog box as described in step 5 of the above help article.
- For an example on how to move newly created users to the OU you need, see Move Newly Created Users to a Specific OU
Second, we use a unique username script that fires before the creation of a user account. Illegal characters are being allowed. For example, one instance allowed a space in the user logon name ("De Silva" allowed "de silva" as a username). Another instance recently allowed an apostrophe for a name like O'Neal. Of course, display names and full names we prefer to keep special characters, but all of these extras should be filtered out or disallowed for email aliases and user logon names upon creation. So, is the unique username script somehow bypassing the property pattern requirements?
The thing is that not allowing spaces/other characters (such as characters with umlaut) would also require another script triggered before creating a user. For examples of such scripts, see the 5th and the 6th Examples in step 5 of the Validate/Modify User Input Using a Script Tutorial. If you employ such scripts, then the best approach in such a case would be probably to combine the scripts in a single script that is called only once.
If you want, you can post here or send to our support email (adaxes@softerra.com) the scripts that you use for character replacement and for making sure that the username is unique, and we'll assign our script guy to work on the scripts.
Third, I'm using a custom attribute called CustomAttributeTimestamp1 which I'll use for new user provisioning. I want that to be a required field but never seems to force it required on the form even though it's designated as required.
How do you create the users? Is it a Home Page Action or you just use the Create user Operation? Also, did you specify the default value for the property in your Property Pattern?