It's all about IAM

Get SQL Connection for OIM Database

Generally we tcDataProvider to execute SQL query on OIM Database but sometime tcDataProvider doesn't help and we need java.sql.Connection. Here's how you get java.sql.Connection inside OIM:

java.sql.Connection connection = Platform.getOperationalDS().getConnection();