Skip to content
mhuberSA edited this page Jun 18, 2020 · 5 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.

User to group

Associate user to group.

groupName - The group to add the user.

userId - The userId to associate to the group.

GroupAssociationResponse - Returns with list of failures in case of an error. Otherwise, it returns a status and message valid.

GroupAssociationResponse addGroupToUser(String groupName, String userId);

SAAccess saAccess = new SAAccess(applianceHost, appliancePort, applianceSSL, selfSigned, realm, applicationID, applicationKey);
try {
    saAccess.addGroupToUser("groupName", "userId");
}catch (SARestAPIException e){
    //handle exception
}

User to Groups

Associate User To Groups userId - The userId to associate to the group.

UserToGroups - The array of groups to associate to the user.

GroupAssociationResponse - Returns with list of failures in case of an error. Otherwise, it returns a status and message valid.

GroupAssociationResponse addUserToGroups(String userId, UserToGroups userToGroups);

SAAccess saAccess = new SAAccess(applianceHost, appliancePort, applianceSSL, selfSigned, realm, applicationID, applicationKey);
UserToGroups userToGroups = new UserToGroups(new String[]{"group1", "group2"});
try {
    saAccess.addUserToGroups("userId", userToGroups);
}catch (SARestAPIException e){
    //handle exception
}

Users to Group

Associate Group to Users UsersToGroup - The array of users to associate to the group.

groupName - The Group Name.

GroupAssociationResponse addUsersToGroup(UsersToGroup usersToGroup, String groupName);

SAAccess saAccess = new SAAccess(applianceHost, appliancePort, applianceSSL, selfSigned, realm, applicationID, applicationKey);
UsersToGroup usersToGroup = new UsersToGroup(new String[]{"user1", "user2"});
try {
    saAccess.addUsersToGroup(usersToGroup, "groupName");
}catch (SARestAPIException e){
    //handle exception
}

Group to User

Associate Group to User groupName - The Group Name to associate to the user.

userId - The userId.

GroupAssociationResponse addGroupToUser(String groupName, String userId);

SAAccess saAccess = new SAAccess(applianceHost, appliancePort, applianceSSL, 
selfSigned, realm, applicationID, applicationKey);

try {
    saAccess.addGroupToUser("groupName", "userId");
}catch (SARestAPIException e){
    //handle exception
}
Clone this wiki locally