-
Notifications
You must be signed in to change notification settings - Fork 15
Group Association
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.
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
}
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
}
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
}
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
}