It's all about IAM

Identity And Access Management - Rajiv Dewan

Sample Code: To Search Organization with Organization Key


Search Organization using OIM 11g API


Here is the sample code for the same:

Long orgKey = 1L;
OrganizationManager orgService = oimClient.getService(OrganizationManager.class);
Set orgCritAttrs = new HashSet();
SearchCriteria orcriteria = new SearchCriteria("act_key", orgKey, SearchCriteria.Operator.EQUAL);
orgCritAttrs .add(OrganizationManagerConstants.AttributeName.ORG_NAME.getId());
List orgs =, orgCritAttrs, null);
System.out.println("Organization Result Set Size:: " + orgs.size());
String organizationName = (String) orgs.get(0).getAttribute("Organization Name");
System.out.println("Organization Name :: " + organizationName);

No comments:

Post a Comment