Manage Users with a Component Interface
Sometimes, you might need to work on a PeopleSoft instance that doesn't have a PIA. While you can still do a lot of things, one thing that is quite hard to do is managing users - create new users and modifying existing ones using the database alone.
Fortunately, there's a workaround. If you have two-tier application designer access (i.e., database access), you can use the component interface tester and a few component interfaces to manager users.
Clone a User
If you want to create a new user, the easiest way is to clone an existing one. The component, USER_SAVEAS
provides this functionality. There probably won't be a component interface for this so create a new component interface in application designer based on the USER_SAVEAS
component, and accept the default properties. You'll need to save the component interface (e.g. USER_SAVEAS_CI
) before you can work with it.
Now, click on the right hand side of the screen (CI side), and choose:
Once the tester has loaded, simply select the OPRID
of an existing user, like VP1
or PS
and click on Get Existing.
Change the following properties:
-
OPRID
to your new username -
OPERPSWD
to an appropriate password -
OPRDEFNDESC
to an appropriate description for your user (e.g. their name) -
OPERPSWDCONF
to the password you set (confirm password) -
COPY_IDTYPES
to N (don't copy the ID information from the user like their Employee ID).
Right click on the top of the CI tree (USER_SAVEAS_CI
) and choose the Save method as shown:
If it all works, you will get a Save()
results return value of 1
. Go check PSOPRDEFN
to confirm, and of course try logging in as your new user. Slightly easier than trying to figure out all the relevant PeopleTools tables and writing a script hey?
Modifying an Existing User
To modify an existing user, you can use the delivered component interface, USER_PROFILE
which is based off the component USERMAINT
- the component you use to edit a user normally.
Again, open the component interface and choose:
You'll need to specify the UserID (OPRID
) and press Get Existing. There are many things you could do from here:
- Change the
PrimaryPermissionList
- Change the
RowSecurityPermissionList
- Expand out
EmailAddresses
and modify the email address - Expand out
Roles
and add another role - Change the User's Password
If you are adding a value to a collection, like Roles,
right click on the collection and choose InsertItem. Use an index [Number]
of the last index. For example, if your user has 6 roles, then the last entry will be Roles [6]
. So use an index of 6
. Note you'll need to do this twice for some strange reason. If you use an invalid index, the following message will appear:
001: Invoke - [InsertItem]. (Errors Pending)
Invalid item number. {USER_PROFILE.Roles.InsertItem} (91,54)
You'll know it has worked if you see another entry in Roles (and not the error above). Continuing with the example of 6 roles, there should now be a Roles [7]
entry you can expand on and where you can specify the role name (e.g. PeopleSoft Administrator). Then go back to the top of the tree, right click on USER_PROFILE
and press Save.
You might be wondering how to change the password? Well, right click on the top, USER_PROFILE CI
and click on the SetPassword
method. Then specify your new password.
No Comments