Retrieve Authorized Users (QSYRAUTU) API


  Required Parameter Group:


  Optional Parameter:


  Default Public Authority: *USE

  Threadsafe: Yes

The Retrieve Authorized Users (QSYRAUTU) API provides information about the authorized users of the system. It returns a list of authorized user names that meet the selection criteria specified by the caller of the API and information about those users. This API provides information similar to the Display Authorized Users (DSPAUTUSR) command.


Authorities and Locks

Authority to User Profiles in List of Authorized Users
*READ or be authorized to the Database Administrator function of the IBM i through System i™ Navigator's Application Administration support. The Change Function Usage (CHGFCNUSG) command, with a function ID of QIBM_DB_SECADM, can also be used to change the list of users allowed to use the function.

Note: If you are not authorized to the Database Administrator function of the IBM i, only those profiles to which you have *READ authority are returned in the list.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The receiver variable that receives the information requested. You can specify the size of the area to be smaller than the format requested as long as you specify the length parameter correctly. As a result, the API returns only the data that the area can hold.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable provided. The length of receiver variable parameter may be specified up to the size of the receiver variable specified in the user program. If the length of receiver variable parameter specified is larger than the allocated size of the receiver variable specified in the user program, the results are not predictable.

Returned records feedback information
OUTPUT; CHAR(16)

Information about the entries that are returned in the receiver variable.

See Format of Returned Records Feedback Information for details.

Format name
INPUT; CHAR(8)

The name of the format that is used to return information about the authorized users.

You can specify these formats:


Selection criteria
INPUT; CHAR(10)

The users that are returned.

Possible values follow:


Starting profile name
INPUT; CHAR(10)

The profile name at which to start the listing. The profile names are listed alphabetically.

Possible values follow:


Starting profile option
INPUT; CHAR(1)

This parameter indicates whether the starting profile name is returned when an exact match for the starting profile name is found. Possible values follow:


Group profile name
INPUT; CHAR(10)

The group profile whose members are to be returned. The profile that is specified must exist and must be a group profile.

A group profile name or *NOGROUP is required if *MEMBER is specified for the selection criteria parameter. The group profile name must be *NONE if the selection criteria parameter is not *MEMBER.


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Optional Parameter

Ending profile name
INPUT; CHAR(10)

The profile name at which to end the listing. Specifying an ending profile name can limit the names that are returned.

If this parameter is not provided, *LAST is used as a default. Possible values are:



Receiver Variable Description

The following tables describe the order and format of the data returned in the receiver variable for each profile name in the list. For detailed descriptions of the fields in the tables, see Field Descriptions.

AUTU0100 Format



AUTU0150 Format



AUTU0200 Format



AUTU0250 Format



Format of Returned Records Feedback Information

For a description of the fields in this format, see Field Descriptions.



Field Descriptions

Bytes available.

The number of bytes of data available to be returned to the user in the receiver variable. If all data is returned, bytes available is the same as the number of bytes returned. If the receiver variable was not big enough to contain all of the data, this value is estimated based on the total number of authorized users of the system and the format specified.

Bytes returned. The number of bytes of data returned to the user in the receiver variable. This is the lesser of the number of bytes available to be returned or the length of the receiver variable.

Entry length for each profile returned. The entry length, in bytes, of each element in the list of profile names. A value of zero is returned if the list is empty.

Group members indicator. Whether this user is a group that has members. Possible values follow:

Group profiles. The array of group profiles for the user. The number of group profiles field indicates how many entries are in the array.

Number of group profiles. The number of group profiles returned in the group profiles field. The number of group profiles will be zero if the user is not a member of any groups.

Number of profile names. The number of complete entries in the list of profile names. A value of zero is returned if the list is empty.

Profile name. The name of an authorized user for whom information is returned.

Reserved. An ignored field.

Text description. The descriptive text for the user profile.

User or group indicator. Whether this user is a user profile or a group profile. Possible values follow:


Error Messages



API introduced: V3R7

[ Back to top | Security APIs | APIs by category ]