- package com.oimacademy.NeedEvaluate;
- import Thor.API.Security.XLClientSecurityAssociation;
- import com.oimacademy.connection.Platform;
- import com.thortech.xl.client.dataobj.tcDataBaseClient;
- import com.thortech.xl.dataaccess.tcDataProvider;
- import com.thortech.xl.dataaccess.tcDataSet;
- import com.thortech.xl.dataaccess.tcDataSetException;
- import oracle.iam.platform.OIMClient;
- import oracle.iam.platform.authopss.exception.AccessDeniedException;
- import oracle.iam.provisioning.api.ProvisioningService;
- import oracle.iam.provisioning.exception.AccountNotFoundException;
- import oracle.iam.provisioning.exception.GenericProvisioningException;
- import java.util.Hashtable;
- import java.util.logging.Level;
- import java.util.logging.Logger;
- import javax.security.auth.login.LoginException;
- public class RevokeAccounts {
- public static void main(String[] args) throws AccountNotFoundException, AccessDeniedException, GenericProvisioningException,tcDataSetException {
- OIMClient oimClient = null;
- tcDataProvider dbProvider = null;
- try {
- ProvisioningService provService = Platform.getService(ProvisioningService.class);
- XLClientSecurityAssociation.setClientHandle(oimClient);
- dbProvider = new tcDataBaseClient();
- String query = "SELECT OIU_KEY FROM OIU"; // Query all accounts
- tcDataSet accountsDataSet = new tcDataSet(); // store result set of // query
- accountsDataSet.setQuery(dbProvider, query);
- accountsDataSet.executeQuery();
- int numRecords = accountsDataSet.getTotalRowCount();
- for (int i = 0; i < numRecords; i++) {
- accountsDataSet.goToRow(i);
- long accountId = accountsDataSet.getLong("OIU_KEY");
- provService.revoke(accountId); // revoke account
- }
- } finally {
- if (oimClient != null)
- oimClient.logout();
- }
- }
- }
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 Revoke Accounts From OIU Table
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