Examples of Loading User-Update Requests

Use the User object to manage existing users and their roles. This topic provides examples showing how to create some typical user-update requests.

Updating a User

This example creates a request to update the user name for the user identified by the specified person number.

METADATA|User|PersonNumber|Username
MERGE|User|12312|carlton.baugh@vision.com

This example creates a request to suspend an active user.

METADATA|User|PersonNumber|Suspended
MERGE|User|12312|Y

This example creates a request to activate a suspended user.

METADATA|User|PersonNumber|Suspended
MERGE|User|12312|N

This example updates the CredentialsEmailSent indicator, which determines whether an email containing the user credentials is sent to the user. If the CredentialsEmailSent indicator is Y, then no email is sent. If the indicator is N, then an email is sent. In this example, the indicator is changed from Y to N.

METADATA|User|PersonNumber|CredentialsEmailSent
MERGE|User|12312|N

Updating User Roles

You use the User component to add a single role. Note that you supply role codes rather than role names. For example, you specify ORA_PER_EMPLOYEE_ABSTRACT rather than Employee to add the employee role. If you supply an invalid role code, then the request is created but any attempt to provision the role fails.

This example creates a request to add a single role to the user.

METADATA|User|PersonNumber|RoleCommonName|AddRemoveRole
MERGE|User|12312|ORA_PER_EMPLOYEE_ABSTRACT|ADD

This example creates a request to add multiple roles to the user. You use the User Role component to add multiple roles.

METADATA|User|PersonNumber
MERGE|User|12312
METADATA|UserRole|PersonNumber|RoleCommonName|AddRemoveRole
MERGE|UserRole|12312|ORA_PER_EMPLOYEE_ABSTRACT|ADD
MERGE|UserRole|12312|ORA_PER_LINE_MANAGER_ABSTRACT|ADD

This example creates a request to remove a single role from the user. You use the User component to remove a single role.

METADATA|User|PersonNumber|RoleCommonName|AddRemoveRole
MERGE|User|12312|ORA_PER_EMPLOYEE_ABSTRACT|REMOVE

This example creates a request to remove multiple roles from the user. You use the User Role component to remove multiple roles.

METADATA|User|PersonNumber
MERGE|User|12312
METADATA|UserRole|PersonNumber|RoleCommonName|AddRemoveRole
MERGE|UserRole|12312|ORA_PER_EMPLOYEE_ABSTRACT|REMOVE
MERGE|UserRole|12312|ORA_PER_LINE_MANAGER_ABSTRACT|REMOVE

Creating a User Account

You can use the User object to create a user account in limited circumstances. For example:

  • An attempt to request a user account when loading the Worker object has failed.

  • The GeneratedUserAccountFlag attribute of the Person User Information component was set to N either by mistake or intentionally for the loaded worker.

Creating a user account is a two-step process:

  1. Create the user.

  2. Activate the user and add roles.

This example creates a request to create a user account for the specified person number. You can also supply a user name if required. If you supply no user name, then the user name is generated in the default format as specified on the Security Console. Once the account exists, it's suspended immediately as it has no roles.

METADATA|User|PersonNumber|GenerateUserAccount
MERGE|User|12312|Y 

This example activates the user account and adds roles so that the account remains active.

METADATA|User|PersonNumber|Suspended
METADATA|UserRole|PersonNumber|RoleCommonName|AddRemoveRole
MERGE|User|12312|N
MERGE|UserRole|12312|ORA_PER_EMPLOYEE_ABSTRACT|ADD
MERGE|UserRole|12312|ORA_PER_LINE_MANAGER_ABSTRACT|ADD
Tip: User-update requests aren't processed until Send Pending LDAP Requests next runs. If the process isn't scheduled, remember to run it.

Deleting a User Account

This example deletes the user account for the worker with the specified person number.

METADATA|User|PersonNumber
DELETE|User|12312