Identity Manager


OIM 11gR1: ContextManager returns null inside Scheduled Task


We're trying to obtain the User ID of the user that ran a Scheduled Job (i.e. clicked the "Run Now" button) from inside of the Scheduled Task code. We were under the assumption that we could get this information from ContextManager, but it seems all of the relevant fields are null when called inside of a Scheduled Task. This is from debug output from the task: ContextManager.getContextType() = ADMINContextManager.getContextSubType() = nullContextManager.getJAASUser() = nullContextManager.getOIMUser() = nullContextManager.getOrigUser() = nullContextManager.getProxyUser() = nullContextManager.getUserPreference(KEY) = nullContextManager.getUserPreference(EMAIL) = null What are we missing? Is there a different context level/parent or somewhere else we can get this info? Thanks,Wayne
check ContextManager apiimport oracle.iam.platform.context.ContextManager;ContextManager.getOIMUser() AuthenticatedSelfService asfService = Platform.getService(AuthenticatedSelfService.class);User currActor= asfService.getProfileDetails(null); http://docs.oracle.com/cd/E28280_01/doc.1111/e14309/context.htm#OMDEV829 Reference: To retrieve logged in user's details from session in OIMOIM 11g : Get the logged in user id in eventhandler ~J
Scheduled tasks always run as the user defined in the oim-config.xml file which is by default the OIMINTERNAL user.  -Kevin
Hi Abhishek,Thanks for the reply. My original post describes the issues we're seeing with ContextManager (everything's null!). I tried the AuthenticatedSelfService service, but that returns the OIMINTERNAL user as the authenticated user, probably because the reference is obtained from Platform. Wayne
Hi Kevin,Thanks for the reply. I was aware of that the tasks run under the context of OIMINTERNAL, but I was hoping there was some way to get the user that actually ran the job. What's interesting is that if you look at the ORCHPROCESS table for the job ("SCHEDULE NOW" operation), the CONTEXTVAL field XML does contain the user ID of the user running the task in the "origuser" and "oimuser" properties. Was hoping to be able to get at these somehow programmatically from inside the task. Thanks,Wayne
The same use case was asked in the below post: Did you see this post?To retrieve logged in user's details from session in OIM ~J

Related Links

ERROR IN PROVISIONING USER TO HOMEDRIVE USING THE WINNDOWS 2000 CONNECTOR
ORM JBOSS cluster
Is IdXML going away from OAM?
when defining access control, Unable to expand searchbase
How to use assign someone the oracleDASEditUser priv with limitations
AD to OID integration problems bootstraping.
Oracle Access Manager 10.1.4.0.1 WebPass
How to hide fields in User Form in OIM?
OIM_AD
Problem in SPML configuration
Oracle Access Manger
Approval workflow for EBS responsibilties and AD Groups
Disable Resource in OIM
CSV file feed to OIM
Problem in object form prepopulate
Approvals

Categories

ORACLE DEV
Downloads Issues
Oracle Application Exp...
Learning Management
UIX
Content Services
中间件
Backup & Recovery (Kor...
Portal (Korean)
Applications Integrati...
Business Intelligence ...
PeopleSoft Enterprise
Documaker
Product Hub
Enterprise Service Bus...
BPA Suite (Korean)
LCM: Oracle iSetup
QAZone e-TEST suite Fo...
Performance Testing
Test Management/Functi...
QA/Testing
Architecture
SOA Governance
weblogic.developer.int...
weblogic.developer.int...
weblogic.developer.int...
weblogic.developer.int...
weblogic.developer.int...
bea.workshop.historica...
Tuxedo Newsgroups
Liquid Infrastructure ...
weblogic.eventserver.cep
Business Intelligence ...
dev2dev Bugs Report ((...
OVM Templates
Designer (Korean)
Java HotSpot Virtual M...
Java Speech [ARCHIVE]
Java Applet Development
Sun Java System Identi...
Java Virtual Machine (...
HotSpot Internals [ARC...
Solaris 11
Installation and Integ...
Java Errors and Error ...
Sun Update Connection
Sun Java System Access...
General Java Mobile Qu...
AVK Portability
Sun Web Developer Pack...
Java Programming [Arch...
Systems Maintenance
Sun ONE Meta-Directory
Grid Engine
テクノロジー
On Track - General
Calc Manager
JD Edwards (Chinese)
Enterprise Metadata Ma...
Eloqua For Sales
E10 Users
Twin Cities Eloqua Use...
Eloqua AppCloud Develo...
SFDC Integration
Pittsburgh, PA Eloqua ...
B2B Marketing
Privacy and Compliance
OTN América Latina Tou...
Solaris Beta
OMC - Industry Solutio...
Move Goods
Oracle JET
LWUIT
Base de Datos Discusió...
OpenStack for Oracle S...
Oracle Cloud Applicati...
Synopsis
Cloud Accelerate
Peru
Oracle Cloud Machine
Containers
Oracle Partner Acceler...
HrOUG
JUG Africa Social Group
Java Development Tools
XML DB
Sensor-Based Services ...
产品
Data Integrator
Hyperion System 9 Appl...
产品专区
Web Application Develo...
Oracle Communications ...
Big Data Connectors/Ha...
Technical Questions
Oracle Storage Cloud S...
Oracle Financials Clou...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile