OIM API To Revoke Grants From Role

package com.NeedEvaluate;

import java.util.HashSet;
import java.util.Set;
import com.massiveGaze.connection.Platform;
import oracle.iam.identity.rolemgmt.api.RoleManager;
public class RevokeRoleGrant {

 public static void revokeRoleGrant() {
  RoleManager rolemanagersvc = Platform.getService(RoleManager.class);
  String roleKey = "27"; // role key of the role to be removed testrole
  String usrKey = "2010"; // usr key of the user from which the role must        
  Set<String> usrKeys = new HashSet<String>();
  usrKeys.add(usrKey);

  try {
   rolemanagersvc.revokeRoleGrant(roleKey, usrKeys);

  } catch (Exception e) {
   e.printStackTrace();
  }
 }

 public static void main(String args[]) {
  revokeRoleGrant();
 }
}

No comments:

Post a Comment

About OIM

Oracle Identity Management enables organizations to effectively manage the end - to - end life - cycle of user ide...

Popular Posts