Example code to find if a resource is put in service or not in OIM11g

Gurus,

I'm new to IOM.

I would check whether or not resources AD is put into service for a given user. If provided, I would like to add that user to a group.
Can you please provide me a sample code for this scenario. I use oim 11g.

Here is the sample code snippet.

tcUserOperationsIntf usrIntf = (tcUserOperationsIntf.class) Platform.getService;
tcResultSet provisionedObjects = usrIntf.getObjects (Long.valueOf (sourceUserKey));
"String objectKey =" ", objectStatus =" ", processInstance =" "', objectName =" ";"
List of the entityAttrList;
RequestBeneficiaryEntity entity = null;
entityAttrList = new ArrayList ();
entity = new RequestBeneficiaryEntity();
for (int i = 0; i)< provisionedobjects.getrowcount();="">
{
entityAttrList = null;
provisionedObjects.goToRow (i);

objectStatus = provisionedObjects.getStringValue ("Objects.Object Status.Status");
objectName = provisionedObjects.getStringValue ("Objects.Name");

System.out.println ("processing:" + ObjectName);

If (objectName.equalsIgnoreCase ("AD Account") & objectStatus.equalsIgnoreCase ("Provisioned"))
System.out.println ("provisioned");
}

And to give a role to a user

String take = "101".
String roleKey = "10".

RoleManager roleMgr = oimClient.getService (RoleManager.class);
UserKeys value = new HashSet();
userKeys.add (take);
Result = roleMgr.grantRole (roleKey, userKeys) RoleManagerResult;
System.out.println("Status:"+result.getStatus());)

Tags: Fusion Middleware

Similar Questions

  • How to find vCenter virtual cluster large when the services are not running?

    Does anyone have advice for locating vCenter in a cluster, when his services are not running?

    For example, I have to restart vCenter and its network is having issues.  I need to go to the host ESX (i) is on and open the console to get to the virtual machine.  But to find that host is on can sometimes take a long time, because I have to log in to each HOST and see if it is the host where vCenter.

    Does anyone have any advice or suggestions to make this process easier?  It is not so important, but just curious to know what others might suggest.

    Thank you.

    I used PowerCLI and

    to connect-viserver esx1, esx2, esx3

    connect to all the ESX(I) hosts and then run

    Get - vm vCenterServerName | Select the name, the host

  • It was not useful to reinstall CS on an upgrade and need a 'response Code' cat representatives a Rep. The Adobe Customer Service.

    I reinstall CS to a purchase of upgrade and need a 'response Code' cat representatives a Rep. The Adobe Customer Service were not helpful at all.

    I am the holder of the registration for the software and had previously installed. I replaced my system and you need to reinstall all my software.  have software, boxes and serial in my possession. Previously, I was directed to ctl + shft + dble left click to receive a challenge code that was provided to the Adobe representative, Customer Service which in turn provide a response code that would allow my software to record properly.

    Can someone direct me to please a live agent to help me past this obstacle, or give directions for the same.

    Thanks in advance.

    Dave

    [email protected]

    Tried new support chat online and found an individual who understood exactly what to do.

    For any other person with the same problem, here's what to do:

    1. Enter the serial number of the upgrade of the software (look for the green check mark)
    2. Select the product calling and enter the serial number of eligible product
    3. Software either active or generates an error message. If the error message, go to step 4
    4. Hit (ctrl + Shift + Double click left) - which launches the sequence of stimulus / response as follows:
    5. system creates a code of challenge you will need to provide Adobe with a customer service representative
    6. Adobe customer service will provide you with a response code that perfectly complements the software activation
  • HP Compaq 6910 p: 6910p "this device cannot find enough free resources that it can use. (Code 12) »

    Under hardware and Sound/devices and printers, I have a yellow triangle with my 6910p icon.  Right click on the "hardware" tab States "this device cannot find enough free resources that it can use. (Code 12).

    I've recently upgraded the operating system to Windows 7 Professional.  Everything works ok but I show this yellow triangle where the devices are displayed.  When I look in Device Manager/Mobile Intel (r) 965, I get a window saying 'Problem detected with Mobile Intel (r) 965 Express Chipset Family'.   The next window States: "the device cannot find enough free resources that it can use. (Code 12).  If you want to use this device, you have to disable other devices on the system once".

    How can I go about doing so, the yellow triangle disappears?

    I tried to reinstall device Base system SP46972 and SP45738 of the video driver.

    Not sure if this is related, but I also have a black screen with a 1 in. border on the left and the right, which was not the case when Windows XP is the operating system.  I also need to solve this problem as well.  Searches on Google did not find the solution, so I hope someone can provide the answers to these two questions.

    Glad to hear that you would have recommended as the next step.  It has proved to be a challenge, but one that we have managed to find solutions for.    Thanks again for all your help and patients.     Carl

  • Code 12 Mobile Intel (r) Express Chipset Family 995 cannot find enough free resources that it can use. Must disable another device.

    I know what this means, but do not know how to fix it!  What other device safely disable to make this work?  Any help will be appreciated.  Thank you!

    See this:

    Code 12: This device cannot find enough free resources that it can use
    http://TechNet.Microsoft.com/en-us/library/cc732199 (v = ws.10) .aspx

    Try running the Fixit mentioned on the link under "additional information."

    If this does not work, try this:

    Go to Device Manager, under the display adapter, double-click on your Mobile Intel (r) Express Chipset Family 995 to see its properties. Click on the 'Resources' tab, under "Conflicting device list" note the device in conflict. Look for the device in Device Manager, if its listed under "other devices" right click and uninstall the device. Alternatively, you can "update driver software... ' or 'Disable' the device.

    See the links in the reference below:
    Resolve conflicts the Windows Device Manager
    http://support.verizonwireless.com/CLC/devices/Knowledge_base.html?ID=48051

    Troubleshooting of conflict of devices with Device Manager
    http://support.Microsoft.com/kb/310126

    Resolve hardware conflicts
    http://www.annoyances.org/exec/show/article07-003

  • This device cannot find enough free resources that it can use. If you want to use this device, you will need to disable one of the other devices on this system (Code 12)

    Guys, I have a problem. So, my laptop has 2 graphics cards, an integrated course of the Intel HD graphics (which works perfectly) and the other being the dedicated Nvidia graphics (Nvidia GeForce 940 m). Until 2 days ago, everything was going well and running.

    I have the application experience GeForce and it prompted me that there is a new driver update should I download. He started to install then after rebooting to complete the installation, it failed. I checked my device manager and saw a yellow exclamation under under my Nvidia graphics card (remember, my laptop has two graphics cards: Nvidia graphics card and Intel HD graphics that works correctly). I immediately checked the details, and he said:

    "This device cannot find enough free resources that it can use. (Code 12) »

    "If you want to use this device, you will need to disable one of the other devices on this system."

    This seemed very strange, because it was LITERALLY working properly before I was invited about update driver I got, so I don't know what to do - as a matter of fact, literally, I finished this game, Deadpool, with my Nvidia card that I put as the default graphics card, a few hours before , so I don't know why this happened. Any help? I'm looking for a logical answer to this, guys!

    Additional information:

    A few days before this happened, I went to my store local pc and installed an extra 4 gigs of ram on my 4 existing to make 8. Don't know if it's useful, but anyway

    If I pick up my laptop and shake it side by side, I hear a slight rattling noise, and it seems a little loose (I found this out after seeing the error message). The noise seems to come from just below the middle of my keyboard (I'm using a laptop). If for some reason, my Nvidia card is loose? Is this possible?

    I am quite technologically inclined, but not to the extent of removing components and reconstruction cell phones / pc and access the bios and what not. I can only remove/add ram.

    I want to know if its something I am able to fix it because I do not necessarily want to go running and sending my laptop places - only my pc up shop.

    Here is the location of my Nvidia card: PCI Slot 4 (PCI bus 4, device 0, function 0)

    My specs:

    Acer TravelMate p257-MG

    Windows 7 business

    Intel core i5-5200u 2.20 GHz 2.20 Ghz processor

    8.00 GB of ram

    64-bit operating system

    1 t hard drive

    940 m Intel HD graphics 5500 & Nvidia Geforce card

    Just to recap, I get the error on my Nvidia graphics card code, "this device cannot find enough free resources that it can use. (Code 12) ""If you want to use this device, you will need to disable one of the other devices on this system. »

    Thanks in advance!

    Hello

    Thank you for your response.

    I appreciate your time.

    I suggest you run ' Intel Chipset Software Installation Utility ' and check.
    Reference:
    http://www.Intel.com/content/www/us/en/support/software/Chipset-Software/Intel-chipset-software-installation-utility.html

    Please keep us updated.

    Thank you

  • PCI GBE Family Controller feature: ___This Windows 7 Ethernet Controller problem___Realtek cannot find enough free resources that it can use. (Code 12)

    My ethernet controller does not work since the installation of Windows 7 Edition home premium.

    Hello
    Code 12

    This device cannot find enough free resources that it can use. If you want to use this device, you will need to disable one of the other devices on this system. (Code 12)

    Cause

    This error can occur if two devices that are installed on your computer received the same i/o ports, the same interrupt, or the same Direct memory access channel (whether through BIOS, the operating system, or both). This error message can also appear if the BIOS did not allocate enough resources for the device.

    Recommended resolution

    You can use the Troubleshooting Wizard in Device Manager to determine where the conflict is, and then disable the device in conflict.

    Turn off the device in conflict

    1. In the device properties dialog box, click the general tab.
    2. Click troubleshoot to start the Troubleshooting Wizard . The wizard will ask a few simple questions and provides a solution to your problem, based on the answers you provide.
    3. Follow the resolution steps provided by the wizard to resolve the problem.

    If you want to say thanks to someone just click on Vote as useful (i.e. under each avatar of the user).

    If your issue is resolved, please indicate then your wire is with solution.

  • This device (graphics card), cannot find enough free resources that it can use. (Code 12) __NetBook ASPIRE ONE - display adapter resource conflict?

    This device (graphics card), cannot find enough free resources that it can use. (Code 12)
    NetBook ASPIRE ONE - display adapter resource conflict? Can't find the other conflicting H-washer? Graphics Intel Graphic Media Accelerator 3150.
    If you want to use this device (graphics card), you will need to disable one of the other devices on this system. I bought this camera 6 weeks, I can't get the maximum. Set-up for my graphics cards. 800 x 600-32 bit only. Please tell me what to do. And ASPIRE or Windows7 customer service phone #. Thank you.

    Hi athe43,

    Below I've listed the details of error Code 12 and the article with additional information:

    Code 12

    This device cannot find enough free resources that it can use. If you want to use this device, you will need to disable one of the other devices on this system. (Code 12)

    Cause

    This error can occur if two devices that are installed on your computer received the same i/o ports, the same interrupt, or the same Direct memory access channel (whether through BIOS, the operating system, or both). This error message can also appear if the BIOS did not allocate enough resources for the device.

    Recommended resolution

    You can use the Troubleshooting Wizard in Device Manager to determine where the conflict is, and then disable the device in conflict.

    Turn off the device in conflict

    1. In the device properties dialog box, click the general tab.
    2. Click troubleshoot to start the Troubleshooting Wizard. The wizard will ask a few simple questions and provides a solution to your problem, based on the answers you provide.
    3. Follow the resolution steps provided by the wizard to resolve the problem.

    http://support.Microsoft.com/kb/310123

    This article was originally for XP however the description still applies.  Also, please see the following article on the opening of the troubleshooter of hardware for Windows 7:

    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter

    Hope that helps!

    Debra
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Code 12: This device cannot find enough free resources that it can use

    Original title: Please help me with this error
     
    The device information
    Name: Intel G41 Express Chipset
    ID: PCI\VEN_8086 & DEV_2E32 & SUBSYS_2E321849 & REV_03\3 & 11583659 & 0 & 10
    Error code: 12

    Hi RoseLover,

    ·         How long have you been faced with this problem?

    ·         You did it last changes before the show?

    Error code 12:

    This device cannot find enough free resources that it can use. If you want to use this device, you will need to disable one of the other devices on this system. (Code 12)

    Cause:

    This error can occur if two devices that are installed on your computer received the same i/o ports, the same interrupt, or the same Direct memory access channel (whether through BIOS, the operating system, or both). This error message can also appear if the BIOS did not allocate enough resources for the device.

    I suggest you download the latest drivers for the graphics drivers on the Intel site and see if the problem is resolved. Check the links below.

    http://www.Intel.com/support/chipsets/sb/CS-022768.htm

    http://www.Intel.com/support/graphics/detect.htm

    Apart from that, I suggest you to refer the below link.

    Updated a hardware driver that is not working properly

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    I hope this helps!

  • Removed USB controllers: can not return - "this device cannot find enough free resources that it can use. (Code 12)

    Original title: removed USB controllers: can not return

    Hello

    So today I tried to connect to a printer, and it wouldn't work (separate the issue, I don't want to worry about that now)

    I've seen several messages saying: you need to uninstall the USB controllers in Device Manager and then restart your PC. The pilots would then automatically reinstalled.

    It didn't happen, and now my Dell touch screen does not work. I can miss several other USB controllers too, I uninstalled about 3 of them, but I don't know whether or not it has been reinstalled.

    I currently have:

    -Hub USB generic

    -Enhanced host controller USB Intel (R) 8 series #1-9C 26

    -USB root hub

    -Host controller compatible xHCI USB

    Note that the last of them was a symbol of error on it and reads as follows:

    "This device cannot find enough free resources that it can use. (Code 12)

    If you want to use this device, you will need to disable one of the other devices on this system. »

    Can someone please tell me how much USB controllers I should have and how to save them?

    Thank you very much

    Hi Shalini.

    Thanks for the reply, but if you read through the posts on this thread, I think you will find that it has already been suggested that I do these two things - what I've done many times without result.

    Fortunately, I managed to fix it myself.

    To satisfy your curiosity and help someone else who could see this thread with a similar problem, here are the steps I took finally solve the problem:

    ______________________________________________

    I was always convinced that the problem is basically with the xHCI USB controller that I saw always reported as not working not properly in the device (Code 12) Manager. With this in mind, I set out to see if I could determine what the device was supposed to be in conflict with. I ran msinfo32 and began to examine the conflicts/sharing section. After a while, I decided I could not see anything obviously problematic or direct me to the controller xHCI, so I gave up on that front.

    Well, if I couldn't fix the problem with the current installation, maybe that I could find another way to install the xHCI USB controller that could circumvent the flaw that seems to be caused when windows reinstalls automatically it when restarting after the abduction. So I started trying to learn more about this "xHCI USB controller" - since Googling this term has given no end of problems not related.

    In Device Manager, I found a way to isolate the details of this driver in device (somewhere under the properties I believe) Manager. This has created a custom device showing in view only a select few connects the Manager. I have spent some time in the analysis of these and found the time during which the camera has stopped working properly. Suddenly a pattern emerges. Over and over again, see you the following series of when I was hoping that allowing windows to reinstall automatically the driver would to fix:
    • Device PCI VEN_8086 & DEV_9C31 & SUBSYS_05F91028 & REV_04\3 & 11583659 & 0 & A0 has been removed

    [Rebooted PC]

    • Device PCI VEN_8086 & DEV_9C31 & SUBSYS_05F91028 & REV_04\3 & 11583659 & 0 & A0 has been configured
    • Device PCI VEN_8086 & DEV_9C31 & SUBSYS_05F91028 & REV_04\3 & 11583659 & 0 & A0 had a problem starting.

    Under each newspaper was referring to a driver name, I didn't already had access to: driver name: usbxhci.inf

    Now I got some new information about the xHCI USB controller, I took to Google. After much research (and not find something relevant), I found 2 obscure references to the driver who seemed at least somewhat relevant.
    The first reference has been a post on the forum where someone's USB ports stopped working. very similar problem to mine! There is little of any particular use in the nets, with the exception of the reference to a couple of windows updates: KB 2823516 or KB2822241

    It is not clear exactly what usbxhci.inf capacity was tied to these updates, but I made a note of them and moved.

    Another article contained no mention of specific ports USB not working does not and was centered around a different problem entirely. However, he has mentioned an another windows update: KB2919355-x 64.msu

    This one (as I remember) was clearer on the relationship between the update and changes to the usbxhci.inf file.

    Now, I had three updates which could make changes to usbxhci.inf at one point. With their name on a piece of paper, I started looking through my updates installed to see which ones I had installed. I soon discovered that Ko 2823516 or KB2822241 were not present on my PC, which saved the penalty to guess who would be the right to uninstall first.

    KB2919355 has been installed, and I made the decision to uninstall it, because as far as I knew, this update changed something in usbxhci.inf. After the initial uninstall was completed, but before the mandatory reboot for changes to take effect, I went into Device Manager and removed the xHCI USB... because I was afraid that if the new, "defective" was always present during the reinstallation of the update, it doesn't change anything.

    The device is removed once more, I rebooted the system. He drives for a considerable period, uninstall the update and then seems to have some sort of hitch; declare something in the sense of "we could not complete the operation. Changes to undo. " He stayed like that for a while before the system became operational again and began to "prepare windows. Once it was over, I discovered that my touchscreen and USB ports worked very well.

    Investigation later showed that the compatible USB xHCI host controller was is no longer marked with warnings. In addition, a series of USB controllers appeared that had not been there when the xHCI device was defective. I was also pleased to note that the update of windows for KB2919355 had already been reinstalled without messing up anything.

    _________________________________________________

  • Example code to check if a particular resource is implemented in OIM11g

    Hello

    I would check whether or not resources AD is put into service for a given user. If so, I would like to add a group to it.

    Can you please provide me a sample code for this scenario. I use oim 11g.

    Hello

    Here is a code example:

    tcResultSet userSet = userAPI.findUsers (userSearchMap);
    If (userSet.getRowCount)<= 0)="">

    System.out.println ("found user in IOM:-" + userID);
    continue;
    }

    userSet.goToRow (0);
    Take long = userSet.getLongValue ("Users.Key");

    tcResultSet userObjSet = userAPI.getObjects (take);

    for (int i = 0; i)< userobjset.getrowcount();="" i++)="">
    userObjSet.goToRow (i);

    If (roName.equalsIgnoreCase (userObjSet
    {.getStringValue ("Objects.Name")))}

    objStatus = userObjSet
    .getStringValue ("Objects.Object Status.Status");
    oiu_key long = userObjSet
    .getLongValue ("object Instance.Key");
    If (!) ("Provisioned".equalsIgnoreCase (objStatus))
    || "Disabled".equalsIgnoreCase (objStatus) "| Active. "
    {.equalsIgnoreCase (objStatus)))}

    continue;
    }
    }
    }

    Concerning
    user12841694

  • Satellite L300 - 29 X - device cannot find enough free resources

    I recently had to reinstall completely Windows Vista Home Premium, and before that, I was able to play games for example: World of Warcraft, Counterstrike Source;

    Since reinstalling Windows my display driver adapter doesn't work. It displays error "this device cannot find enough free resources that it can use. (Code 12) »
    And I m stuck trying to fix this problem. I tried some display drivers, but I think that I have I don't have the right one for my model.

    Thank you very much, Jessica

    Hello

    Microsoft says that this error message especially if two or more devices have been attributed, ports of entry/exit (e/s), the same interrupt, or the same Direct access channel in memory. The assignment was made by the basic input/output system (BIOS), the operating system, or a combination of both.
    This error message can also appear if the BIOS did not allocate enough resources for the device.

    To resolve this problem, you should go to Device Manager and should remove/uninstall the graphics card from the list of devices.
    Then, you should reboot the device and need to reinstall the driver of compatible graphics card.

    PS: Take a look at the BIOS. If a newer version is available and then try to update.

  • My iPhone 6 s + has been stolen. I got the code to access and iCloud, and I putted in find my iPhone. Here illegally, could unlock iPhone and log in icloud.

    My iPhone 6 s + has been stolen. I got the code to access and iCloud, and I putted in find my iPhone. Here illegally, could unlock iPhone and log in icloud. I only had reference no.. MKV82LL/A, Series n F2 * RWV on the packaging. I wonder how do I get it back?

    < personal information under the direction of the host >

    Hello Miss116,

    I am so sorry your iPhone was stolen, it's a terrible feeling, and I'm here to help you with everything I can.

    1. go to a computer and go to iCloud.com and sign in with your Apple ID and password.

    2. go find iPhone and all devices at the top, click on your iPhone.

    3. click on lost Mode and put in a phone number where you can be reached.

    4. click Next, then enter a message that says something along the lines, "Please find my iPhone, please call this number to return."

    5. click on done

    Best wishes to get your iPhone back safely.

  • I bought DC Acrobat Pro from Best Buy.  I received a redemption code and find my serial number.  When I try to install Acrobat I tells me that I use and incorrect serial number.  Help!

    I bought DC Acrobat Pro from Best Buy.  I received a redemption code and find my serial number.  When I try to install Acrobat I tells me that I am using an incorrect serial number.  What should I do now?  Help!

    Hi mlhightree,

    Please visit this link:redemption code help .

    Let us know if you face any problem.

    Thank you!

    Shivam

  • I can't find my redemption code? I can't save my photoshop because I can not add it to my creative cloud

    I can't find my redemption code? I can't save my photoshop because I can not add it to my creative cloud

    Hello

    See help here - https://helpx.adobe.com/x-productkb/global/redemption-code-purchase-help.html

    ^ Ani

Maybe you are looking for

  • WHY MY INTERNET LIVING LOG OUT TIME AND TIME AGAIN?

    Why my internet disconnected to keep minutes and you reconnect again and again unplug new over2... I never have this issue before... it keep "Request timeout for icmp_seq" and reconnect... it's because I have updated to OS X El Capitan? or something

  • stop the sound alert for new email

    the alert stops other his webinar

  • deleting disabled extensions - no button

    With the most recent updates some extensions have been disabled because they are incompatible, but there is no button on the extension to remove it. Why? How can I remove it?

  • ENVY of HP dv6-7215nr Notebook PC: portable computer upgrade wireless for AC

    Hi I have the ENVY of HP dv6-7215nr Notebook PC and it has the Intel Centrino Wireless - N 2230 card. I would like to replace it with a card that meets the standards of the AC and works on a network of 5 GHz. Are there compatible replacement cards? T

  • Perforce Workspace and LabVIEW

    Hello I take more than one job where I use an existing computer that has been configured with Perforce for Source control of LabVIEW. I use the same local workspace as my predecessor who is simple, the c drive. When I create a new VI and add it to pe