- package com.oimacademy.role;
- import java.util.HashSet;
- import java.util.List;
- import java.util.Set;
- import oracle.iam.identity.rolemgmt.api.RoleManager;
- import oracle.iam.identity.rolemgmt.vo.Role;
- import com.oimacademy.connection.Platform;
- public class AssignMutipleRolesToUser {
- public static void main(String[] args) throws Exception {
- String ROLE_NAME_PREFIX = "MyRole*";
- RoleManager roleMgr = Platform.getService(RoleManager.class);
- List<Role> roleList = new SearchRole().searchRoleConfigParams(ROLE_NAME_PREFIX);
- Set userKeys = new HashSet();
- userKeys.add("5005");
- for(Role role: roleList){
- roleMgr.grantRole(role.getEntityId(),userKeys);
- System.out.println("Granted role -> "+role.getEntityId()+ " To user -> "+userKeys);
- }
- }
- }
Oracle Identity Manager(OIM) is the Provisioning Solution from oracle. This page contains an index with references to all OIM related posts in the oracle identity manager Academy blog. The posts included herein are intended to provide oracle identity management customers and developers with technical information about best practices for implementing OIM based solutions.
OIM API to Assign Multiple RolesToUser
Subscribe to:
Post Comments (Atom)
-
Connection Related API's : OIM DB Connection/ Data Source connection OIMClient API / OIMConnection API OIM Platform API to getSer...
-
Error : Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframewor...
-
In this post, we set the middle name as “MiddleName” if user does not provide middle name during user create operation. Below are high...
No comments:
Post a Comment