Skip to content
lxbridges edited this page Jun 19, 2020 · 14 revisions

Use this guide to to retrieve end user statuses through the SecureAuth Identity Management API and to check the status of end users, unlock locked-out users, disable users, and more.

To receive detailed statuses from Active Directory, you must enable the Advanced AD User Check option in the SecureAuth IdP Data tab. If the option is disabled, you will receive incorrect statuses.

Get User Status

Retrieves the user's status from the username in the endpoint URL and returns a response.

userId- The user ID that you want to get status.

BaseResponse - Returns a BaseResponse with status, message and user id.

BaseResponse getUserStatus(String userId);

Set User Status

Method invokes a status to the user Id.

userId - The User ID that you want to change status.

status - The new status [lock, unlock, enable, disable].

BaseResponse - Returns a BaseResponse with status, message and user id.

BaseResponse setUserStatus(String userId, String status)

How to use it

First you should create an Instances of SAAccess object which represent the connections and which can be used to query the API.

private String applianceHost = "yourhost.com";
private String appliancePort = "443";
private boolean applianceSSL = true;
private boolean selfSigned = true;

private String realm = "realmId";
private String applicationID = "appID";
private String applicationKey = "appKey";

SAAccess saAccess = new SAAccess(applianceHost, appliancePort, applianceSSL, 
selfSigned, realm, applicationID, applicationKey);
try {
    BaseResponse baseResponse = saAccess.getUserStatus("foobar");
    BaseResponse baseResponse = saAccess.setUserStatus("foobar", "disable");
    BaseResponse baseResponse = saAccess.getUserStatus("foobar");
}catch (SARestAPIException e){
    //handle exception
}

Release Version

Available from 1.0.5.3

Clone this wiki locally