Module UserService

Macros to create and manipulate user accounts in the system.

Since: 2.1

Macro Summary
external

LSAF
%lsaf_createuser(lsaf_userid=, lsaf_displayname=, lsaf_email=, lsaf_accounttype=, lsaf_password=, lsaf_firstname=, lsaf_lastname=, lsaf_department=, lsaf_phone=);
Creates a user account.
external

LSAF
%lsaf_deleteuser(lsaf_userid=);
Deletes a user account.
external

LSAF
%lsaf_encryptpassword(lsaf_password=);
Encrypts the password for a user account.
external

LSAF
%lsaf_getallusers(sas_dsname=work.lsafGetAllUsers);
Gets the metadata for all of the user accounts that are defined. The metadata is stored in a ...
external

LSAF
%lsaf_lockuser(lsaf_userid=);
Locks a user account.
external

LSAF
%lsaf_resetpassword(lsaf_userid=, lsaf_newpassword=);
Resets the password for a user account.
external

LSAF
%lsaf_unlockuser(lsaf_userid=);
Unlocks a user account.
external

LSAF
%lsaf_updateuserinfo(lsaf_userid=, lsaf_displayname=_lsaf_updateuser_donotupdate_, lsaf_email=_lsaf_updateuser_donotupdate_, lsaf_accounttype=_lsaf_updateuser_donotupdate_, lsaf_firstname=_lsaf_updateuser_donotupdate_, lsaf_lastname=_lsaf_updateuser_donotupdate_, lsaf_department=_lsaf_updateuser_donotupdate_, lsaf_phone=_lsaf_updateuser_donotupdate_);
Updates the general user account information.
external

LSAF
%lsaf_userexists(lsaf_userid=);
Indicates whether a user account exists.

Macro Detail

%lsaf_createuser(lsaf_userid=, lsaf_displayname=, lsaf_email=, lsaf_accounttype=, lsaf_password=, lsaf_firstname=, lsaf_lastname=, lsaf_department=, lsaf_phone=);

[ Exposure: external ]
Creates a user account.

Syntax:
%LSAF_CREATEUSER(LSAF_USERID=lsaf-userid, LSAF_DISPLAYNAME=lsaf-displayname,
LSAF_EMAIL=lsaf-email, LSAF_ACCOUNTTYPE=lsaf-accounttype, LSAF_PASSWORD=lsaf-password,
<, LSAF_FIRSTNAME=lsaf-firstname, LSAF_LASTNAME=lsaf-lastname,
LSAF_DEPARTMENT=lsaf-department,LSAF_PHONE=lsaf-phone>);

          
History:
   2013-10-30
initial coding
   2016-08-26
rebrand as LSAF
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_userid - - Required - The user identifier of the account.
lsaf_displayname - - Required - The display name of the account.
lsaf_email - - Required - The email address of the account.
lsaf_accounttype - - Required - The account type. Valid values:
        - INTERACTIVE
        - NON_INTERACTIVE
        Default: None
lsaf_password - - Required - The password for the account.
lsaf_firstname - - Optional - The first name of the user for the account.
lsaf_lastname - - Optional - The last name of the user for the account.
lsaf_department - - Optional - The business unit for the account.
lsaf_phone - - Optional - The phone number of the user for the account.
File: lsaf_createuser.sas
First available in version: 1.3

%lsaf_deleteuser(lsaf_userid=);

[ Exposure: external ]
Deletes a user account.

Users who have logged in are not eligible for deletion and can only be deactivated.

Syntax:
%LSAF_DELETEUSER(LSAF_USERID=lsaf-userid);

          
History:
   2013-10-30
initial coding
   2016-08-26
rebrand as LSAF
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_userid - - Required - The user identifier of the account.
File: lsaf_deleteuser.sas
First available in version: 1.3

%lsaf_encryptpassword(lsaf_password=);

[ Exposure: external ]
Encrypts the password for a user account.

The returned encrypted password can be used as a valid password to log in to SAS Life
Science Analytics Framework. The encrypted password is invalid for the user interface log in
to SAS Life Science Analytics Framework. The value of the encrypted password is written to
the SAS log file.

Syntax:
%LSAF_ENCRYPTPASSWORD(LSAF_PASSWORD=lsaf-password);

          
History:
   2016-09-26
initial coding
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_password - - Required - The password.
File: lsaf_encryptpassword.sas
First available in version: 1.5

%lsaf_getallusers(sas_dsname=work.lsafGetAllUsers);

[ Exposure: external ]
Gets the metadata for all of the user accounts that are defined. The metadata is stored in a
SAS data set.

Syntax:
%LSAF_GETALLUSERS(<,SAS_DSNAME=SAS-data-set>);

          
History:
   2013-10-30
initial coding
   2016-08-26
rebrand as LSAF
   2016-12-07
added account license type
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
sas_dsname - - Optional - The name of the output SAS data set to contain the metadata
        for the users, specified as libref.dataset. The default value is
        WORK.LSAFGETALLUSERS. The data set contains a row for each user, sorted by the user
        ID, and columns with the following names:
        - userId: The unique login identifier for the account.
        - displayName: The display name for the account.
        - firstName: The first name of the user.
        - lastName: The last name of the user.
        - email: The email address for the user.
        - department: The business unit for the user.
        - phone: The phone number for the user.
        - isAccountActive: Indicates whether the account is active. Valid values:
        0=no, 1=yes.
        - accountLicenseType: The account license type.
        - isAccountLocked: Indicates whether the account is locked. Valid values:
        0=no, 1=yes.
        - accountActivationDate: The date on which the account becomes active, represented
        in Character format.
        - accountDeactivationDate: The date on which the account becomes inactive,
        represented in Character format.
        - accountLockedBy: The user identifier of the user who locked the account.
        - accountLockedDate: The date on which the account was locked, represented
        in Character format.
        - accountType: The type of account. Valid values: INTERACTIVE and NON_INTERACTIVE.
        - lastLogin: The date on which the account was last logged on to, represented in
        Character format.
        - loginAttempts: The current number of failed login attempts that are associated
        with the account. If the number exceeds the configured threshold, this account is
        locked. The counter is reset after a successful login.
        - passwordCreated: The date on which the current password was created, represented
        in Character format.
        - passwordExpiration: The date on which the current password expires, represented
        in Character format.
        - isPasswordExpired: Indicates whether the password has expired. Valid value:
        0=no, 1=yes.
        - dateAccountActivation: The date on which the account becomes active, represented
        in SAS DateTime format.
        - dateAccountDeactivation: The date on which the account becomes inactive,
        represented in SAS DateTime format.
        - dateAccountLocked: The date on which the account was locked, represented in
        SAS DateTime format.
        - dateLastLogin: The date on which the account was last logged on to, represented
        in SAS DateTime format.
        - datePasswordCreated: The date on which the current password was created,
        represented in SAS DateTime format.
        - datePasswordExpiration: The date on which the current password expires,
        represented in SAS DateTime format.
File: lsaf_getallusers.sas
First available in version: 1.3

%lsaf_lockuser(lsaf_userid=);

[ Exposure: external ]
Locks a user account.

The person who runs the macro must have the user account privilege Manage User Accounts.

Syntax:
%LSAF_LOCKUSER(LSAF_USERID=lsaf-userid);

          
History:
   2014-3-19
initial coding
   2016-08-26
rebrand as LSAF
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_userid - - Required - The user identifier of the user account.
File: lsaf_lockuser.sas
First available in version: 1.4

%lsaf_resetpassword(lsaf_userid=, lsaf_newpassword=);

[ Exposure: external ]
Resets the password for a user account.

The person who runs the macro must have the user account privilege Manage User Accounts.
After the password has been successfully reset, the user can immediately log on with the new
password. But, the user is required to immediately change the password so that the password
remains known only to the user.

Syntax:
%LSAF_RESETPASSWORD(LSAF_USERID=lsaf-userid, LSAF_NEWPASSWORD=lsaf-password);

          
History:
   2013-11-04
initial coding
   2016-08-26
rebrand as LSAF
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_userid - - Required - The user identifier of the account.
lsaf_newpassword - - Required - The new, temporary password.
File: lsaf_resetpassword.sas
First available in version: 1.3

%lsaf_unlockuser(lsaf_userid=);

[ Exposure: external ]
Unlocks a user account.

The person who runs the macro must have the user account privilege Manage User Accounts.

Syntax:
%LSAF_UNLOCKUSER(LSAF_USERID=lsaf-userid);

          
History:
   2014-3-19
initial coding
   2016-08-26
rebrand as LSAF
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_userid - - Required - The user identifier of the user account.
File: lsaf_unlockuser.sas
First available in version: 1.4

%lsaf_updateuserinfo(lsaf_userid=, lsaf_displayname=_lsaf_updateuser_donotupdate_, lsaf_email=_lsaf_updateuser_donotupdate_, lsaf_accounttype=_lsaf_updateuser_donotupdate_, lsaf_firstname=_lsaf_updateuser_donotupdate_, lsaf_lastname=_lsaf_updateuser_donotupdate_, lsaf_department=_lsaf_updateuser_donotupdate_, lsaf_phone=_lsaf_updateuser_donotupdate_);

[ Exposure: external ]
Updates the general user account information.

You must have either the user account privilege Manage User Account General Information or
Manage Users to update user account information.

Syntax:
%LSAF_UPDATEUSERINFO(LSAF_USERID=lsaf-userid, < LSAF_DISPLAYNAME=lsaf-displayname,
LSAF_EMAIL=lsaf-email, LSAF_ACCOUNTTYPE=lsaf-accounttype, LSAF_FIRSTNAME=lsaf-firstname,
LSAF_LASTNAME=lsaf-lastname, LSAF_DEPARTMENT=lsaf-department, LSAF_PHONE=lsaf-phone >);

If an optional parameter is not specified, no change to the existing user attribute value
is made. If the parameter is specified, the specified value is set on the user attribute.
Parameter values must conform to SAS Life Science Analytics validation rules.

          
History:
   2014-03-27
initial coding
   2016-08-26
rebrand as LSAF
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
Parameters:
lsaf_userid - - Required - The user identifier of the account.
lsaf_displayname - - Optional - The user display name.
lsaf_email - - Optional - The user email address.
lsaf_accounttype - - Optional - The user account type. Valid values:
        INTERACTIVE | NON_INTERACTIVE
lsaf_firstname - - Optional - The first name of the user.
lsaf_lastname - - Optional - The last name of the user.
lsaf_department - - Optional - The business unit of the user.
lsaf_phone - - Optional - The phone number of the user.
File: lsaf_updateuserinfo.sas
First available in version: 1.4

%lsaf_userexists(lsaf_userid=);

[ Exposure: external ]
Indicates whether a user account exists.

The macro variable _lsafUserExists_ is set to 1, if the user exists, 0 if it does not.
In the event of an incorrect call to the macro that results in an error, the return value
of _lsafUserExists_ is set to -1.

Syntax:
%LSAF_USEREXISTS(LSAF_USERID=lsaf-userid);

          
History:
   2013-10-30
initial coding
   2016-08-26
rebrand as LSAF
Expected Macro Variables:
_lsafMsg_ - The return message.
_lsafRC_ - The return code.
_lsafUserExists_ - Indicates whether the user account exists.
Parameters:
lsaf_userid - - Required - The identifier of the user account.
File: lsaf_userexists.sas
First available in version: 1.3