- 17 Dec 2024
- 4 Minutes à lire
- SombreLumière
- PDF
userQuery (Command)
- Mis à jour le 17 Dec 2024
- 4 Minutes à lire
- SombreLumière
- PDF
The userQuery command allows querying user accounts that match specified search criteria.
Parameters
Parameter name | Data type | Description |
---|---|---|
sessionID | String | Required. The session identifier of the current administrative session. The logon command returns this identifier after a successful logon (see logon (Command)). |
attributeSet | UserAttributeSet | Required. A set containing zero or more attribute fields that specify the query search criteria. See UserAttributeSet (Data type). |
fieldSet | UserFieldSet | Optional. Specifies the attribute fields to be returned for all the records matching the search criteria. See UserFieldSet (Data type). If fieldSet is omitted, all possible output parameters are returned. If a user attribute field is not set in the database, it is not returned for that specific user account. |
queryOptions | UserQueryOptions | Optional. Options to determine what results should be returned. See UserQueryOptions (Data type). |
Parameter name | Data type | Description |
---|---|---|
results | UserQueryResults | Required. Result structure containing return and status codes and a list of zero or more result attribute fields. See UserQueryResults (Data type). |
UserAttributeSet (Data type)
The attributes specified in this attribute set define the search criteria.
Search attribute fields are interpreted as follows:
- Wildcards are only accepted when the USERFLD_TO_USERID and USERFLD_TO_DOMAIN attributes are not set.
- A wildcard character (*) can be added to the values at the start, the end, or both. They will be interpreted as the SQL LIKE statement.
A list of comma-separated values can be specified for the attribute that specifies the domain name. In this case it will be interpreted as the logical OR of the given values.
You cannot use wildcard characters in comma-separated values.
- If none of the above applies, the search will be done using the exact match of the given value.
Element name | Data type | Description |
---|---|---|
attributes | UserAttribute | Attributes specifying the user query search criteria (see Table: UserAttribute (Data type)). |
Element name | Data type | Description |
---|---|---|
attributeOptions | AttributeOptions | Specifies how to handle the attribute value during request processing, where each option is added as a single element to attributeOptions, e.g.: <negative>true</negative> Supported values:
|
value | Any | The attribute value. The data type has to be specified by setting the xsi:type XML attribute. |
attributeID | UserAttributeIDEnum | The attribute identifier (see Table: userQuery (Supported input attributes)). |
For more information about the specific attributes, see Table: userExecute field attributes.
UserFieldSet (Data type)
The attributes specified in the fieldSet parameter specify the user attribute fields OneSpan Authentication Server should return for the users accounts matching the search criteria.
If fieldSet is omitted, all possible output parameters are returned. If an attribute field is not set in the database, it is not returned for that specific record.
Element name | Data type | Description |
---|---|---|
attributeID | UserAttributeIDEnum | The identifier of an attribute to return (see Table: userQuery (Supported output attributes)). |
For more information about the specific attributes, see Table: userExecute field attributes.
UserQueryOptions (Data type)
This data type determines what results should be returned.
UserQueryResults (Data type)
Example
Retrieve the user ID and domain of jane.doe:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <adm:userQuery xmlns:adm= "http://www.vasco.com/IdentikeyServer/IdentikeyTypes/Administration" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <sessionID>3JSK8cmRjw4E30wAA=0nUTL-~3fmifTO</sessionID> <attributeSet> <attributes> <value xsi:type="xsd:string">jane.doe</value> <attributeID>USERFLD_USERID</attributeID> </attributes> </attributeSet> <fieldSet> <attributeID>USERFLD_USERID</attributeID> <attributeID>USERFLD_DOMAIN</attributeID> </fieldSet> </adm:userQuery> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Retrieve a list of all administrative user accounts (user ID and domain):
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <adm:userQuery xmlns:adm= "http://www.vasco.com/IdentikeyServer/IdentikeyTypes/Administration" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <sessionID>3JSK8cmRjw4E30wAA=0nUTL-~3fmifTO</sessionID> <attributeSet> <attributes> <attributeOptions> <negative>true</negative> <null>true</null> </attributeOptions> <value xsi:type="xsd:base64Binary">0</value> <attributeID>USERFLD_ADMIN_PRIVILEGES</attributeID> </attributes> </attributeSet> <fieldSet> <attributeID>USERFLD_USERID</attributeID> <attributeID>USERFLD_DOMAIN</attributeID> </fieldSet> </adm:userQuery> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Requirements
Required administrative privileges:
- View Administrative Privileges (to use USERFLD_ADMIN_PRIVILEGES as input parameter)
- View User
Additional considerations
After upgrading OneSpan Authentication Server, server data is continuously migrated while the already-upgraded OneSpan Authentication Server service is running. Until data migration has been completed, the result of a query command may be incomplete and may include both migrated and non-migrated data. This means that values for new data fields may be missing or not set correctly in the query result.