One of the more fundamental elements in the Valence Portal is the Valence user profile record. Each user can be authorized to different environments and groups, and will accordingly have access to different library lists and apps in the portal.
By default, any valid IBM i user can log into the Valence Portal and have a Valence user profile record created automatically if they don’t already have one. The auto-generated Valence user will assume environment and group membership based on a profile specified in Portal Admin > Settings. It is thus recommended that this template user profile have very limited access to mostly inquiry-only type applications, so that new users don’t gain immediate access to sensitive information. You can also blank out the template profile to deactivate this auto-create functionality altogether.
To assist in the administration of IBM i sites with many users, it is possible to have the template user profile overridden programmatically based on custom criteria you specify. And now, as of build 6.3.20250108.1, you can also utilize a new “Mass Create Users” option that has been added to Portal Admin.

Option 1: Using the global Default User Template
As mentioned above, the Default User Template is specified in Portal Admin > Settings > Login Method > “Default user template”. When specified, any IBM i user logging into the Valence Portal for the first time will have a Valence user profile automatically created on-the-fly, using this template profile as its basis for setting available environments, group membership and app authority.

To turn off this automatic profile creation feature, simply blank out this template field.
Option 2: Overriding the Default User Template via an exit program
If you have a way of determining which department each IBM i user should belong to, and can set up or designate a Valence profile template for each department, then you can programmatically override the template upon login to automate user creation in the Portal. The exit program for this purpose should be modeled after source member EXEXITPGMU in the VALENCE6/QRPGLESRC file, and the compiled object name should be specified in Portal Admin > Settings > Exit Programs > “Session login – user template override”.

As described in the EXEXITPGMU comments, the exit program accepts an input parameter of the IBM i user logging into Valence, and returns a separate parameter with the Valence login ID that should be used as the template for creating the user.
Option 3: Mass creating users in Portal Admin
For cases where you would like to manually mass-create Valence user profiles for IBM i users, you can leverage a new function in Portal Admin > Users that was introduced in build 6.3.20250108. The mass-create function is accessed by moving your mouse over the Plus icon in the lower right, then clicking on the “Add Users” icon that appears, as depicted here:

Once Add Users is clicked, a window will appear listing all the enabled IBM i profiles that do not yet have corresponding Valence profiles set up, with info pulled from WRKUSRPRF and WRKDIRE and placed into the appropriate columns.

Here you select all the IBM i profiles you want to mass-add to Valence, overriding the descriptions, names and email addresses as needed. Click Save to automatically create the profiles based on the Valence profile specified in the toolbar. Those users will then be removed from the list so you can mass-create another batch of users based on a different template profile.
![CNX_logo [Converted]](https://cnxcorp.com/wp-content/uploads/2023/05/CNX_logo-Converted-2.png)
![CNX_logo [Converted]](https://cnxcorp.com/wp-content/uploads/2023/05/CNX_logo-Converted.png)