WCF
Method
public AuthServerFindUsersResponse FindUsers(string authServerPartnerLoginName, string authServerPartnerLoginPassword, string queryFilter, FindUserFilterType queryType )
WCF parameter | data type | description |
---|---|---|
authServerPartnerLoginName | string | SurePassId account login name |
authServerPartnerLoginPassword | string | SurePassId account login key |
queryFilter | string | The filter to be used for searching for users. The value can user SQL wildcards such as %. |
queryType | FindUserFilterType | Identifies the type of queryFilter. Possible values are: Username or Email. If omitted, Username is assumed |
Sample WCF C# Method
AuthServerFindUsersResponse resp = FindUsers("accountLogin", "accountKey", "M%", // search for all users beginning with M FindUserFilterType.LoginName );
Sample WCF C# Repsonse
if (resp.ErrorCode != 0) { message.Text = resp.ErrorMsg; return false; }
REST
REST parameter | data type | description |
---|---|---|
spAccountLoginName | string | SurePassId account login name |
spAccountLoginKey | string | SurePassId account login key |
type | string | find_users |
queryFilter | string | The filter to be used for searching for users. The value can user SQL wildcards such as % |
queryType | string | Identifies the type of queryFilter. Possible values are: username or email. If omitted, username is assumed |
Sample REST/Json Method
{ "spAccountLoginName": "accountLogin", "spAccountLoginKey": "accountKey", "queryFilter": "Mandy@%", "queryType": "username", // the default if not specified "type": "find_users", }
Sample REST/Json Response
{ "Users": [ { "username": "Larry" }, { "username": "loginMarty2" }, { "username": "test" }, { "username": "test2" }, { "username": "test3" } ], "errorCode": 0, "errorMessage": "OK", "type": "find_users" }