RetrieveUserInformation method.
Description.
The RetrieveUserInformation method queries the QSYRUSRI API to obtain complete information about a user profile.
It returns a UserInformation object containing attributes associated with the user profile, such as the password change date, profile status, etc.
Syntax.
RetrieveUserInformation(string userName)Parameters.
| Name | Type | Description |
|---|---|---|
userName |
string |
The name of the user profile (max 10 characters). |
Return.
Returns an object of type UserInformation which contains complete information about the user profile.
This method uses the USRI0300 format, which returns all available information about the user.
UserInformation Class.
| Property | Type | Description |
|---|---|---|
| UserProfileName | string |
IBM i user profile name. |
| PreviousSignOnDateTime | string |
Date and time of the user's last connection. |
| SignOnAttemptsNotValid | int |
Number of failed connection attempts. |
| Status | string |
Current status of the user profile, e.g. active or inactive. |
| PasswordChangeDate | DateTime |
Date of last password change. |
| NoPasswordIndicator | string |
Indicator if the password is missing |
| PasswordExpirationInterval | int |
Interval in days before password expires. |
| DatePasswordExpires | string |
Expiry date of current password. |
| DaysUntilPasswordExpires | int |
Number of days remaining before the password expires. |
| SetPasswordToExpire | string |
Indicates whether the password is set to expire. |
| UserClassName | string |
User class, which determines security privileges (for example, *USER or *SECOFR). |
| SpecialAuthorities | string |
List of special user authorisations. |
| GroupProfileName | string |
Name of the associated main group profile. |
| Owner | string |
Owner of the user profile. |
| GroupAuthority | string |
Group authority level for the user profile. |
| AssistanceLevel | string |
Level of support for this user (for example, *SYSOPR for system operator). |
| CurrentLibraryName | string |
Name of the current library defined for the user. |
| InitialMenuName | string |
Menu displayed on initial connection. |
| InitialMenuLibraryName | string |
Name of the library containing the initial menu. |
| InitialProgramName | string |
Initial programme run on connection. |
| InitialProgramLibraryName | string |
Initial programme library. |
| LimitCapabilities | string |
Limitation of user capabilities (for example, restricted or unlimited). |
| TextDescription | string |
Text description of the profile. |
| DisplaySignOnInformation | string |
User connection information display indicator. |
| LimitDeviceSessions | string |
Maximum number of device sessions allowed. |
| KeyboardBuffering | string |
Method of managing the keyboard buffer for the user. |
| MaximumAllowedStorage | int |
Maximum authorised storage quantity, in MB. |
| StorageUsed | int |
Amount of storage used, in MB. |
| HighestSchedulingPriority | string |
Highest planning priority for this user. |
| JobDescriptionName | string |
Name of the associated task description. |
| JobDescriptionLibraryName | string |
Name of the library containing the task description. |
| AccountingCode | string |
Accounting code associated with this user. |
| MessageQueueName | string |
Name of the user's message queue. |
| MessageQueueLibraryName | string |
Message queue library. |
| MessageQueueDeliveryMethod | string |
Method of distributing messages in the user's queue. |
| MessageQueueSeverity | int |
Level of severity of messages in the user's queue. |
| OutputQueueName | string |
Name of the print output queue. |
| OutputQueueLibraryName | string |
Library for the output queue. |
| PrintDevice | string |
Default print device name. |
| SpecialEnvironment | string |
Special environment for the user (for example, *S36 for System/36). |
| AttentionKeyHandlingProgramName | string |
Name of the key management program Attention. |
| AttentionKeyHandlingProgramLibraryName | string |
Caution key management program library. |
| LanguageID | string |
User language identifier. |
| CountryOrRegionID | string |
User's country or region code. |
| CharacterCodeSetID | int |
Identifier of the character set used. |
| UserOptions | string |
Options configured for this user. |
| SortSequenceTableName | string |
Name of the sort sequence table for user data. |
| SortSequenceTableLibraryName | string |
Sort sequence table library. |
| ObjectAuditingValue | string |
Audit value of user objects. |
| UserActionAuditLevel | string |
Audit level of user actions. |
| GroupAuthorityType | string |
Type of user group authority. |
| OffsetToArrayOfSupplementalGroups | int |
Shift to additional groups table. |
| NumberOfSupplementalGroups | int |
Number of associated additional groups. |
| UserIDNumber | int |
Unique user identifier. |
| GroupIDNumber | int |
Identifier of the user's main group. |
| OffsetToHomeDirectory | int |
Shift to the user's home directory path. |
| LengthOfHomeDirectory | int |
Home directory path length. |
| LocaleJobAttributes | string |
Job attributes specific to the user's location. |
| OffsetToLocalePathName | int |
Shift to the user's location path. |
| LengthOfLocalePathName | int |
Location path length. |
| GroupMemberIndicator | string |
Indicates whether the user is a member of a group. |
| DigitalCertificateIndicator | string |
Indicates the presence of a digital certificate for this user. |
| CharacterIdentifierControl | string |
Character identifier control for the user. |
| OffsetToArrayOfIndependentASPStorageUsageDescriptors | int |
Shift to the table of independent ASP storage usage descriptors. |
| NumberOfIndependentASPStorageUsageDescriptors | int |
Number of independent ASP descriptors. |
| NumberOfIndependentASPStorageUsageDescriptorsReturned | int |
Number of independent ASP descriptors returned. |
| LengthOfIndependentASPStorageUsageDescriptor | int |
Length of an independent ASP descriptor. |
| LocalPasswordManagement | string |
Local password management for this user. |
| BlockPasswordChange | string |
Lock indicator for password changes. |
| UserEntitlementRequired | string |
Indicates the rights required for the user. |
| UserExpirationInterval | int |
User profile expiry interval. |
| UserExpirationDate | string |
Date d’expiration du profil utilisateur. |
| UserExpirationAction | string |
Action to be taken when user profile expires. |
| MaximumAllowedStorageLong | long |
Maximum storage limit for this user (long format). |
| StorageUsedLong | long |
Storage space used for this user (long format). |
| OffsetToStartAuthorityCollectionCommandParameters | int |
Shift to authority collection control parameters. |
| LengthOfStartAuthorityCollectionCommandParameters | int |
Length of authority collection command parameters. |
| AuthorityCollectionActiveIndicator | string |
Indicator showing whether authority collection is active. |
| AuthorityCollectionRepositoryExistsIndicator | string |
Indicator of the existence of the authority collection repository. |
| SupplementalGroups | List<string> |
Additional groups associated with the user. |
| HomeDirectory | string |
The user's personal directory. |
| LocalePathName | string |
Location path specific to this user. |
| IndependentASPStorageUsageDescriptors | List<string> |
ASP-independent storage descriptors for the user. |
| IndependentASPStorageUsageDescriptors | string |
Command parameters for starting authority collection. |
Exceptions.
- InvalidOperationException : Thrown when the size of the returned data is insufficient.
Examples of use.
var userInfo = conn.RetrieveUserInformation("USER");
Console.WriteLine($"User: {userInfo.UserName}, Last sign-on: {userInfo.PreviousSignOnDateTime}, Status: {userInfo.Status}");References.
For more information on the QSYRUSRI API, see the official IBM documentation.