OIM Connector for Peoplesoft - Can you copy a user?

Inside of PeopleSoft there is a copy user profile function which alllows you to make an exact duplicate of the user including security. We use this function when we change a user name (say someone gets married).
Has anyone found a way to do this from OIM?
Thanks.

Using these imports:
import psft.pt8.joa.*;
import PeopleSoft.Generated.CompIntfc.*;
Connect
>
     public Peoplesoft(String hostname, String port, String admin, String password){
          log.info(CLASS_NAME + " -----> inputs=hostname[" + hostname +
                    "]port[" + port +
                    "]admin[" + admin +
                    "]password[********]");
          this.hostname = hostname;
          this.port = port;
          this.admin = admin;
          this.password = password;
          this.strAppServerPath = hostname + ":" + port;
          boolean connect = false;
          try{
               //***** Create PeopleSoft Session Object *****
               oSession = API.createSession();
               //***** Connect to the App Server *****
               connect = oSession.connect(1, strAppServerPath, admin, password, null);
               log.debug("Connection: " + connect);          
               if (!connect) {
                    log.error("Unable to Connect to Application Server.");
                    ErrorHandler();
                    return;
          }catch (Exception e) {
               e.printStackTrace();
               log.error("An error occurred");
               ErrorHandler();
          log.info(CLASS_NAME + " -----> connect=" + connect);
>
Create User
>
     public String createUser(String oprid, String oprdefndesc, String useridalias, String operpswd,
               String emplid, String emailid, String emailtype, String language_cd, String multilang_cd,
               String currencycode, String prpermissionlist, String rowpermissionlist,
               String processprofilelist, String navigatorhomelist){
          log.info(CLASS_NAME + ".createUser()-----> inputs=oprid[" + oprid +
                    "]oprdefndesc[" + oprdefndesc +
                    "]useridalias[" + useridalias +
                    "]operpswd[" + "********" +
                    "]emplid[" + emplid +
                    "]emailid[" + emailid +
                    "]emailtype[" + emailtype +
                    "]language_cd[" + language_cd +
                    "]multilang_cd[" + multilang_cd +
                    "]currencycode[" + currencycode +
                    "]prpermissionlist[" + prpermissionlist +
                    "]rowpermissionlist[" + rowpermissionlist +
                    "]processprofilelist[" + processprofilelist +
                    "]navigatorhomelist[" + navigatorhomelist +"]");
          String response = "";
          boolean next = false;
          try{
               //***** Get Component Interface *****
               IUserProfile oUserProfile;
               String ciName;
               ciName = "USER_PROFILE";
               oUserProfile = (IUserProfile) oSession.getCompIntfc(ciName);
               if (oUserProfile == null) {
                    log.error("Unable to Get Component Interface " + ciName);
                    ErrorHandler();
                    response = "UNABLE_TO_GET_CI";
               }else{
                    next = true;
               //***** Set the Component Interface Mode *****
               oUserProfile.setInteractiveMode(false);
               oUserProfile.setGetHistoryItems(false);
               oUserProfile.setEditHistoryItems(false);
               if (next){
                    next = false;
                    boolean create = oUserProfile.create();
                    log.debug("Create:" + create);
                    if (!create){
                         ErrorHandler();
                         response = "UNABLE_TO_CREATE";
                    }else{
                         next = true;
               if (next){
                    next = false;
                    //***** Set Component Interface Get/Create Keys *****          
                    oUserProfile.setUserID(oprid);
                    oUserProfile.setUserDescription(oprdefndesc);
                    oUserProfile.setUserIDAlias(useridalias);               
                    oUserProfile.setPrimaryPermissionList(prpermissionlist);
                    oUserProfile.setRowSecurityPermissionList(rowpermissionlist);
                    oUserProfile.setProcessProfilePermissionList(prpermissionlist);
                    oUserProfile.setNavigatorHomePermissionList(navigatorhomelist);
                    oUserProfile.setLanguageCode(language_cd);
                    oUserProfile.setCurrencyCode(currencycode);               
                    if (multilang_cd.equals("0")){
                         oUserProfile.setMultiLanguageEnabled(BigDecimal.valueOf(0));
                    }else{
                         oUserProfile.setMultiLanguageEnabled(BigDecimal.valueOf(1));
                    if (emailid.trim().length()==0){
                         if (emailtype.trim().length()==0){
                              //Set/Get EmailAddresses Collection Field Properties -- Parent: PS_ROOT Collection
                              IUserProfileEmailaddressesCollection oEmailAddressesCollection;
                              IUserProfileEmailaddresses oEmailAddresses;
                              oEmailAddressesCollection = oUserProfile.getEmailAddresses();
                              oEmailAddresses = oEmailAddressesCollection.item(0);
                              oEmailAddresses.setEmailType(emailtype);
                              oEmailAddresses.setEmailAddress(emailid);
                              oEmailAddresses.setPrimaryEmail("Y");
                         }else{
                              log.debug("emailtype is empty, not setting primary email");
                    }else{
                         log.debug("emailid is empty, not setting primary email");
                    //Set/Get IDTypes Collection Field Properties -- Parent: PS_ROOT Collection
                    IUserProfileIdtypesCollection oIDTypesCollection;
                    IUserProfileIdtypes oIDTypes;
                    oIDTypesCollection = oUserProfile.getIDTypes();               
                    oIDTypes = oIDTypesCollection.item(0);
                    if (emplid.trim().length()==0){
                         oIDTypes.setIDType("NON");
                    }else{
                         oIDTypes.setIDType("EMP");
                         //Set/Get Attributes Collection Field Properties -- Parent: IDTypes Collection
                         IUserProfileIdtypesAttributesCollection oAttributesCollection;
                         IUserProfileIdtypesAttributes oAttributes;
                         oAttributesCollection = oIDTypes.getAttributes();                    
                         oAttributes = oAttributesCollection.item(0);
                         oAttributes.setFieldname("EMPLID");
                         oAttributes.setRecname("PERSONAL_DATA");
     oAttributes.setAttributeName("EMPLID");
     oAttributes.setAttributeValue(emplid);
                    oUserProfile.setSymbolicID("SYSADM1");
                    oUserProfile.setPassword(operpswd, operpswd);
                    boolean save = oUserProfile.save();
                    log.debug("Save:" + save);
                    if (!save){
                         ErrorHandler();
                         response = "UNABLE_TO_SAVE";                         
                    }else{
                         response = "SUCCESS";
                    next = true;
               boolean cancel = oUserProfile.cancel();
               log.debug("Cancel:" + cancel);
               if (!cancel){
                    ErrorHandler();
                    response = "UNABLE_TO_CANCEL";
          }catch (JOAException e) {
               e.printStackTrace();
               log.error("An error occurred");
               ErrorHandler();          
               response = "ERROR";
          log.info(CLASS_NAME + ".createUser()-----> response=" + response);
          return response;
>
Add Role
>
     public String addRole(String oprid, String role){
          log.info(CLASS_NAME + ".addRole()-----> inputs=oprid[" + oprid +
                    "]role[" + role + "]");
          String response = "";
          boolean next = false;
          try{
               //***** Get Component Interface *****
               IUserProfile oUserProfile;
               String ciName;
               ciName = "USER_PROFILE";
               oUserProfile = (IUserProfile) oSession.getCompIntfc(ciName);
               if (oUserProfile == null) {
                    log.error("Unable to Get Component Interface " + ciName);
                    ErrorHandler();
                    response = "UNABLE_TO_GET_CI";
               }else{
                    next = true;
               if (next){
                    next = false;
                    oUserProfile.setUserID(oprid);
                    //***** Execute Get *****
                    boolean get = oUserProfile.get();
                    log.debug("Get:" + get);
                    if (!get) {
                         log.error("No rows exist for the specified keys. Failed to get the Component Interface.");
                         ErrorHandler();
                         response = "UNABLE_TO_GET_USER";
                    }else{
                         next = true;
               if (next){
                    next = false;
                    //***** Set the Component Interface Mode *****
                    oUserProfile.setInteractiveMode(false);
                    oUserProfile.setGetHistoryItems(false);
                    oUserProfile.setEditHistoryItems(false);
                    IUserProfileRolesCollection oRolesCollection;
     IUserProfileRoles oRoles;
     oRolesCollection = oUserProfile.getRoles();
     oRoles = oRolesCollection.insertItem(oRolesCollection.getCount() - 1);
     for (int l = 0; l < oRolesCollection.getCount(); l++) {
if (role.equalsIgnoreCase(oRolesCollection.item(l).getRoleName())) {                           
response = "ROLE_ALREADY_EXISTS";
break;
if (l==oRolesCollection.getCount()-1){
     oRoles.setRoleName(role);
     next = true;
               if (next){
                    next = false;
                    boolean save = oUserProfile.save();
                    log.debug("Save:" + save);
                    if (!save){
                         ErrorHandler();
                         response = "UNABLE_TO_SAVE";                         
                    }else{
                         response = "SUCCESS";
                    next = true;
               boolean cancel = oUserProfile.cancel();
               log.debug("Cancel:" + cancel);
               if (!cancel){
                    ErrorHandler();
                    response = "UNABLE_TO_CANCEL";
          }catch (JOAException e) {
               e.printStackTrace();
               log.error("An error occurred");
               ErrorHandler();          
               response = "ERROR";
          log.info(CLASS_NAME + ".addRole()-----> response=" + response);
          return response;
>
There's some examples to go from.
-Kevin

Similar Messages

  • OIM connectors for Peoplesoft 9.2 and PeopleTool 8.53

    Hi,
    Can anyone guide me on how and where to get the OIM connectors for Peoplesoft 9.2 and PeopleTool 8.53?
    Appreciate the help.
    Regards,
    Deepak

    Nicolas-
    I have seen the previous thread, as it was for 9.1 thought if we have any updated documents for Application 9.2 with the latest tools 8.53, we are planning for the upgrade and want to build the new hardware, Just want to make sure we have good hardware resources in place before starting the upgrade process.
    Regards,
    DMAC

  • Installable for OIM connector for People Soft Employee reconciliation 9.0.4

    I need to install the OIM connector for People Soft Employee reconciliation and user managemnet.
    The latest release of connectors, i.e version 9.1.0. supports People Tools 8.49 and not the previous versions of people soft, i.e 8.48, etc.
    Where can I download the installation media for connector for People Soft Employee reconciliation and user managemnet version 9.0.4 as my people tools installation is 8.48 version.
    Kindly respond.

    Hi Kevin,
    Thanks for your reply,
    We are trying to install the RACF Advanced Connector in OIM.After copying Connector to the ConnectorDefaultDirectory in OIMSERVER , we are trying to install the connector from the OIMAdmin Console. We are able to see the RACF connector version in the dropdown box, when we click on the Load button we are getting the SystemError Page.
    Please let us know if there are any prequisites we need to take care before installing the connector,we dodn't find anything on this in the connector documentation.
    Please help us to install the RACFAdvanced Connecttor
    Thanks,
    Ravi G

  • Error installing OIM Connector for DB User Management

    Hi!
    I'm a newbie in OIM and trying to set up a lab environment for user provisioning and reconciliation.
    I have installed: WebLogic 10.3.3; OIM 11.1.1.3; Oracle Database 11g 11.2.0.1.0
    In order to configure the OIM connector for DB User Management, I am following the OIM Connector Guide for Database User Management (http://docs.oracle.com/cd/E22999_01/doc.111/e28315/deploy.htm#CHDHAJCA) for the installation steps:
    In the Step 2: Connector Installation the Import of Connector XML Files is failing. The error displayed is:
    DOBJ.XML_IMPORT_ERROR
    Duplicate OUG
    I found these error messages from the STDOUT of the OIM Server:
    <Error> <XELLERATE.DATABASE> <BEA-000000> <Class/Method: tcDataBase/writeStatement encounter some problems: ORA-00001: unique constraint (DEV_OIM.PK_OUG) violated
    <Error> <XELLERATE.DDM.IMPORT> <BEA-000000> <Insert failed.>
    <Error> <XELLERATE.DDM.IMPORT> <BEA-000000> <Exception during import
    com.thortech.xl.ddm.exception.DDMException: Duplicate OUG
    Can you please help me in solving this issue?
    Much thanks in advance.
    Edited by: user769080 on Jun 27, 2012 12:35 AM

    Try to research into these tables OUG(List to define the administrators for each Resource Resource) , obj and ugp.
    Something like this:
    select obj.obj_name, oug.oug_write,oug.oug_delete,oug.oug_data_level,ugp.ugp_name from obj,oug,ugp where obj.obj_key=oug.obj_key and oug.ugp_key=ugp.ugp_key
    PK_OUG is a unique key that control (oug.obj_key and oug.ugp_key) together into OUG table. So, if you already have this information that it's trying to insert you will see this error. Probably because of a previous installation. Check CIH table if it already have some information about this connector, probably someone already tried to install this before.
    I hope this helps,
    Thiago Leoncio.

  • Does OIM Connector for Lotus Notes support Domino certification authority?

    Lotus Notes allows an Organization to register servers and users without stamping each server ID and user ID if you have migrated the certifier to a Domino server-based certification authority (CA).
    A Customer has done such a migration to a server-based certification authority (CA), and therefore they have set up Notes and Internet certifiers to use the CA process.
    So, now this Customer does not require access to the certifier ID and ID password.
    Having enabled certifiers for the CA process, they can now assign the registration authority role to administrators, who can then register users and manage certificate requests without having to provide the certifier ID and password.
    My question is: is this compatible with the requirements of Oracle Identity Manager Connector for IBM Lotus Notes and Domino Release 9.0.4, that, among other parameters, requires to specify CertPath (Complete file specification of the certifier ID to be used when creating certifier ID files) and CertPwd (Password of the certifier ID file)?
    Regards,
    Angelo Carugati

    I quite new with OIM, but not at all... For sure, I need to configure a connector for Lotus Notes / Domino.
    The main points in my question are (USING A connector for Lotus Notes / Domino):
    - How can I create 1 user account (and related data), on different servers (IT Resources), with different "mail templates", when the data should be the same, and the user mail database, should only be a replica on the the 2nd server
    - Maybe, I need to configure 2 distincts IT Resources, and run both (through Provisioning Policies), when I need to provision a user, as described in my scenario (above), right?
    - In the 2nd server, I dont want the user to be created with a new mail database (neither new user data, as shortName, IDfile... ).
    I want that same data, and a replicated mail DB is generated on the 2nd server (webmail server)
    Is it possible, how can I configure this within OIM connector for Lotus Notes / Domino?

  • OIM connector for Microsoft Lync Server

    Experts,
    Do we have any OIM connector for Microsoft Lync Server (previously Microsoft Office Communications Server)?
    If not how can we integrate it with OIM for user provisioning ?
    Please suggest.
    Thanks,
    S M.

    Hi,
    Oracle doesn't have Lync connector . You can install the 11.x Exchange/AD connectors and after AD/Exch provisioning , you can write a task to execute your custom power shell which can set lync related attributes in AD/Exchange .
    Hope this helps .
    Regards
    Suren

  • Can you have multiple users for one account?

    Can you have multiple users for one account? if so how do you set it up.
    We are using it for our department and it would be great to see who created what form instead of it being all one name.

    Each person should have their own account. You can easily share the forms with other people in your department. You will be able to see who the author of the form is.
    More information on how to share :
    http://forums.adobe.com/docs/DOC-2462
    Information on how to copy a forms to a different account :
    http://forums.adobe.com/docs/DOC-1390
    Hope this helps
    Gen

  • Concerning midi data in GarageBand for iOS: can we copy midi data from one virtual instrument to another?

    Concerning midi data in GarageBand for iOS: can we copy midi data from one virtual instrument to another?
    For instance: I play my "lucky take" on the virtual piano, and now I am curious how it would sound on let's say a organ. Normally I would select the midi content out of the piano track and copy it into the organ track. I cannot figure out how to do this in GarageBand for iOS. Is there anyone out there with a solution?
    Thanks!

    It is limited, how you can move regions between tracks. Basically, you can move between tracks with the same touch instrument.  See the help: http://help.apple.com/garageband/ipad/2.0/index.html#chsec12c15d
    Move a region
    Drag the region left or right to move it forward or back in time. Align the left edge of the region with the bar or beat on the ruler where you want it to start playing.
    Drag the region up or down to move it to another track with the same Touch Instrument. You can also drag regions between Keyboard and Sampler tracks, and between Audio Recorder and Guitar Amp tracks. Smart Drums regions cannot be dragged to another Smart Drums track.
    If you move a region so that it overlaps another region, the overlapped part of the “covered” region is deleted.
    Paste a region
    You can paste a region you have copied, or paste an audio file from an app that supports copying audio to the clipboard. GarageBand supports 44.1 kHz sample rate, 16-bit depth uncompressed audio files.
    You can paste copied regions to another track with the same Touch Instrument. You can also paste regions between Keyboard and Sampler tracks, and between Audio Recorder and Guitar Amp tracks. Smart Drums regions cannot be pasted to another Smart Drums track. Audio files copied from another app can be pasted to Audio Recorder or Guitar Amp tracks.
    Move the playhead to the point where you want the region to start.
    Tap the header of the track where you want to paste the region to select the track.
    Tap the track where you want to paste the region, then tap Paste.You can also tap an empty area of Tracks view, then tap Paste. In this case the region is pasted into the currently selected track.

  • OIM connector for Siebel

    Experts, please suggest some resources and guides for OIM connector for Siebel.
    Is this ur http://www.oracle.com/technetwork/middleware/id-mgmt/downloads/connectors-101674.html ok.

    Download and extract the connector.
    You'll see one directory called "documentation". You'll find everything there related to Siebel Connector.

  • Can you copy and burn slideshows made through iPhoto?

    Can you copy and burn slideshows that are made through iphoto?

    Sure that is what the export button is for
    LN

  • HT202213 When using home sharing, can you copy music permanently from an iTunes library to an iPod touch?

    When using home sharing, can you copy music prmanently from a iTunes library to an iPod touch? Is it possible when home sharing music from my Mac to an iPod touch, can you copy the shard music on the ipod touch in to the ipods library?

    Not that I have found via a Google search

  • Can you copy multiple audio (text to speech) files from one slide onto a new slide at once?

    Can you copy multiple audio (text to speech) files from one slide onto a new slide at once? OR do you have to copy and paste each line of text to speech and insert into new slide?

    Hi there
    I believe that you end up with a single file that you can use. Once you get that created, it's an audio file in the library. You may then add the audio file to another slide or object by looking in the Library after choosing to add audio.
    Cheers... Rick

  • Can you copy/paste files from the Finder to Mail in Lion, or drag them onto the Mail icon in the Dock to create a new message and attach the files to it?

    Message title says it: Can you copy/paste files from the Finder to Mail in Lion, or drag them onto the Mail icon in the Dock to create a new message and attach the files to it?
    I can't find anything in the Knowledge Base that says these two options no longer work or still do.
    I do not have a system capable of running Lion, but I need to know the answer nonetheless.

    Gee, I don't know: "paste attachments mail Lion"? ;-)
    One further question, if I may: in Panther (which is where I've aggregated nearly 7 years of mail), if you copy more than one file in the Finder, switch to Mail, and paste the files into a new message, only the file names paste in. If you copy one file and paste it into a Mail message, you get the file, not just the name. Is that still true, or has that (IMHO) bug been fixed since 10.3.9?

  • Pages-when using template for envelopes can you import names/address from address book

    When using templates for envelopes can you import names/address from the address book?

    Drag the VCard from Address Book onto the open envelope template.
    If you want mutiple addresses make a Group of those in Address Book and drag the Group icon onto the Pages template.
    Peter

  • Can you copy an insert in Logic?

    Can you copy an insert in Logic? You can in Pro Tools, anyone know how?

    Yes. ⌥⌘-drag an insert to any other slot and it will be copied (with the same settings). ⌘-drag it and it will be moved only.

Maybe you are looking for

  • Copied music from CDs won't open in itunes

    I copied CDs onto my hard drive using Windows media.  I changed the default settings to iTunes, but when I click 'play' or 'open with', the music will not open with iTunes.  The music works fine in Windows media and Real Player.  I have imported CD's

  • Display Last Login Information ?

    I would like display the last login information for user after success login. I expect to show it via add a dialog or a separate JSP. Where can I get these information and where to add the code ? Thanks.

  • Determine partition range start and stop for a partition

    Hi, Using oracle 11.2.0.3 We are using range interval partitioning and partition sget generated automatically. (range-hash) intervbal 1 month Whilst can check table manually and see start and end range of partition is it possible to query data dictio

  • Don't have marvel.conf

    We are doing an install of HTML DB on an application/web server with the necessary HTTP Server for forms and reports. I have installed HTML DB on a linked computer that is running v9 - and the install went smoothly (after I figured out I needed to cr

  • How to update a Javascript Objects value in D.B

    Hello Friends, Can some one pass me any example pages or documentation related to using the values of HTML/Java Script objects in a PL/SQL region to update the D.B. Appreciate any help. Thanks, Satya.