Add LDAP role to user from java

This is what I have which get's called when the LDAP account is created, but for some reason this gives me the error:
try {
tcLookupOperationsIntf lookup = (tcLookupOperationsIntf) tcUtilityFactory.getUtility(provider, "Thor.API.Operations.tcLookupOperationsIntf");
tcFormInstanceOperationsIntf f = (tcFormInstanceOperationsIntf) tcUtilityFactory.getUtility(provider, "Thor.API.Operations.tcFormInstanceOperationsIntf");
tcResultSet result = lookup.getLookupValues("Lookup.iPlanet.TitleGroups");
String groupDN = null;
for (int i = 0; i < result.getRowCount(); i++) {
result.goToRow(i);
if (result.getStringValue("Lookup Definition.Lookup Code Information.Code Key").equalsIgnoreCase(title)) {
groupDN = result.getStringValue("Lookup Definition.Lookup Code Information.Decode");
break;
if (groupDN != null) {
Map attrChildData = new HashMap();
attrChildData.put("UD_IPNT_GRP_GROUP_NAME", groupDN);
f.addProcessFormChildData(Long.valueOf(childKey), Long.parseLong(pKey), attrChildData);
} catch (Exception e) {
e.printStackTrace();
I think I have the child key messed up. What is the correct way to get the child key of the IPNT group form?

You'll want to get it from the process instance key. Here is an old post of mine that should help you out: Re: Create Access Policy with OIM API: can't fill child form
-Kevin

Similar Messages

  • How to add a role so user can do Export, Copy & paste Master Data?

    How to add a role so user can do Export, Copy & paste Master Data? Thanks!

    Add S_GUI to the user role.

  • EP 701 list roles per users without java developement competencies

    Hello,
    We are running SAP EP 701 SPS6. (UME = J2ee databse itself)
    As a sap basis administrator , I am frequently being asked by the the security team , to produce list of users with all their role/group assigned, the same kind of information that SUIIM would provide in a few minutes on ECC for example.
    I know that theire are several similar topics in this forum, but the responses are centered around J2ee/NWDS/WD java developements,
    unfortunatly I am not a J2ee developer.
    So the only option I have is to export the users from the Identity management into Excel and then try to customize the file.
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID0777776250DB12803944366008386697End?blog=/pub/wlg/2080
    There is a blog on SDN , but unfortunatly it doesnt seem to suit my requirements.
    We have more than 30000 users, each time it takes me several days to generate the list,.
    I am not the only one here experiencing this problem, is there anyone here that has another recipe ?
    Thank you very much for your attention.
    Best Regards
    Raoul

    Hello,
    We are running SAP EP 701 SPS6. (UME = J2ee databse itself)
    As a sap basis administrator , I am frequently being asked by the the security team , to produce list of users with all their role/group assigned, the same kind of information that SUIIM would provide in a few minutes on ECC for example.
    I know that theire are several similar topics in this forum, but the responses are centered around J2ee/NWDS/WD java developements,
    unfortunatly I am not a J2ee developer.
    So the only option I have is to export the users from the Identity management into Excel and then try to customize the file.
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID0777776250DB12803944366008386697End?blog=/pub/wlg/2080
    There is a blog on SDN , but unfortunatly it doesnt seem to suit my requirements.
    We have more than 30000 users, each time it takes me several days to generate the list,.
    I am not the only one here experiencing this problem, is there anyone here that has another recipe ?
    Thank you very much for your attention.
    Best Regards
    Raoul

  • How authentify a windows nt/2k user from java

    Hello, I'm trying to authentify windows 2000 users from a java program, the application have to run in a unix based system (solaris) or if it's necessary, in a windows 2000 machine, Help me please.
    Thanks for everything
    Guillermo Mora
    [email protected]

    Look at http://jcifs.samba.org/ -it's almost full implementation of microsoft SMB networking

  • What authorization-roles for user login (java stack)

    Hello SAP-Fans ,
    which authorization role needs to be assigned to the users for logging into a java-stack on port 50.000?
    We always get the error-message: "Error 403 forbidden, You are not authorized to view the requested resource."
    I know this is a beginner's question. Java is completely new to us.
    Thanks in advance
    Danny Winn

    Hi Danny,
    Welcome to SDN,
    Logon to the portal with the user Administrator, go to User Administartion and create a user for yourself by assigning Super Admin Role.
    portal Url must be http://<host.fqdn>:50XX0/irj/portal where XX is the system number in this case 00.
    You will able to see at the user admin tab all the SAP standard roles.
    regards
    Juan
    Please reward with points if helpful

  • Remove role or user from position

    Hi all,
    we are on ECC 6.0; we are using indirect role assignment. We looking for a way to automate the removing of a user (US) or role (AG) from a position (S).
    eg. remove user 123456 from position 50000001 and user 654321 from position 50000002 in one shot.
    We have found the standard SAP program RHRHDC00 (RE_RHRHDC00 transaction) but is not designed for doing that.
    There's another standard program/function or... for solve this matters?
    Many thanks.
    Massimo

    We looking for a way to automate the removing of a user (US) or role (AG) from a position (S).
    There is a report called RHGRENZ2 which can be used to delimit specific OM infotypes (like IT1001- Relationships) specifying the end-date and Position ID (Object Type S and Object ID= Position) manually. In your case, I believe IT1001's Relationship A008 and B007 have to be delimited in order to remove a user (US) or role (AG) from a position (S) but this report cannot be run for specific relationship types of IT1001 (atleast I did never find an option to filter based on relationship types).
    You can try using report RHRHDL00 to delete IT1001 relationships from PP Database but you should consider the consequences of such deletions and restrict the selection based in infotypes and relationship types carefully.
    Alternatively, you can also build a LSMW script to automate the process of mass delimit/deletion of IT1001's relationship types using transaction PP02 (PP01 is not compatible to BDC/background processing)
    Thanks
    Sandipan

  • OIM 11g add custom role on user creation

    Hi,
    I when i create a user in OIM11g by default it gets added to "ALL USERS" role.
    I have created a new role and want to add user to this custom role while creating users. How can i do this in OIM11g
    Regards,
    Ab
    Edited by: 824473 on Jan 18, 2011 2:33 AM

    set Auto submit true. you can't set the value for ValueChangedListener property in current release of R2. This is bug and you can raise SR for same. But, this won't cause saving data into USR table. ValueChandedListener property for Modify User page only.
    As you said, data is not being saved in the USR table then verify your steps again:
    create sandbox->users->create user/edit user/view user details page->click customize->leftTopcorner->View->Source->select area->edit->Click Add Content (on left top)->Data Component catalog->scroll down and select User VO->Refresh dialogue box->select the field and click 'Add'->on dropdown select 'ADF Input test w/label/for view user page it should be output test w/label->close that window->Check if it added to create user form->save and close customization
    for user detail page select "Managed User->UserVo1 " as datacomponent
    Re: UDF creation on User form in 11gR2
    for valuechangedlistener the fixes all ready available. you have to do some workaround as other poster has given in above link:
    1.Create a sandbox and activate it. Open the page that contains the UDF, and click Customize.
    2.Select View, Source.
    3.Note the value of the valueChangeListener property of a predefined field. To do so:
    a.Click the predefined field, and then click Edit to open the Component Properties dialog box.
    b.Copy the value of the valueChangeListener property.
    4.Export the sandbox as a ZIP file.
    5.Extract the ZIP file and edit the jsff.xml file for the specific screen.
    6.Add the following attributes to the ADF tag, for example af:inputText, for the UDF:
    ◦valueChangeListener=VALUE_COPIED_IN_STEP3
    ◦autoSubmit="true"
    7.Create the ZIP file for the sandbox.
    8.Import the sandbox.
    9.Publish the sandbox.
    Edited by: Nishith Nayan on Sep 21, 2012 1:04 PM

  • Find User from java class

    Hi experts,
    What is the method called in find Users Form ?
    I would like to call it in a java class.
    From a java class, I would like to look for an IDM user in the lighthouse with a login name as a search criteria, how can I do this ?
    Thanks a lot

    From a java class, I would like to look for an IDM user in the lighthouse with a login name as a search criteria, how can I do this ?Method 1 if you don't call it from your webapps, and suppose you create a class to query you repository.
    Method 2 supposed you call your class from the webapps.
    Method 1(bad and ugly method, but no need to read specification): look in your repository, lighouse user are stored here.
    Look, for example, in the account table.
    Method 2: Read the waveset javadoc, at WSUser.
    (IDPACK_2005Q3M3/REF/javadoc/com/waveset/object/WSUser.html)
    WSUser(java.lang.String name, java.lang.String noop)try this :
    WSUser user = new WSUser("youraccountname", null);

  • How To Add Days into a Date from java.util.Date class

    I have a problem when i wants to add 2 or days into a
    date object geting by java.util.Date class. so please help me resolve this issue?
    for e.g i have a date object having 30/06/2001,
    by adding 2 days i want 02/07/2001 date object ?
    Code
    public class test2
    public static void main(String args[])
    java.util.Date postDate = new java.util.Date();
    myNewDate = postDate /* ?*/;
    Here i want to add 2 date into postDate

    Use Calendar...
    Calendar cal = Calendar.getInstance();
    cal.setTime(new Date());
    cal.add(Calendar.DAY, 2); // I'm not sure about that "DAY"

  • LDAP Sync - Syncing users from OID

    We have an instance running the IAM/IDM Suite 11.1.1.5. We have enabled LDAP Sync successfully between OIM and OID. In terms of LDAP Sync functionality, I was wondering whether users in OID can be created in OIM upon a sync. I know updates and deletes in OID can be reflected in OIM. What about creates?
    For example, we have a new OIM instance deployed with no users. We have LDAP Sync enabled to an OID instance with users populatd in the LDAP-configured OU. Assuming all attributes are mapped correctly, can OIM bring these users in through the LDAP Sync?

    If you look at the xml file for LDAPUser, the recon action rules at the bottom, it contains a rule to create when a user is not found. So when you perform the LDAP Sync recon, so long as the changelog picks up the full list of user attributes on creation by a user not in the modifydnfilter, then you will get a new oim user.
    -Kevin

  • Are there any APIs to access user personalization data from java

    Hi gurus,
    We want to access personalization data for a user from java using API. This includes user mapping also.
    If you are aware of any api please let me know.
    Thanks in advance.
    Regards,
      Pratik Thakkar

    Hi Pratik,
    You can also retrieve a system object and get the user mapping for the system:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
    env.put(Context.SECURITY_PRINCIPAL, request.getUser());
    env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
    iCtx = new InitialContext(env);
    ISystem pcdSys =(ISystem)iCtx.lookup(sysId);
    ISystemUserMappingData um = pcdSys.getUserMappingData(request.getUser());
    From this object you can get the user, password and other properties.
    As for personalized values of iView attributes, you can an environmental value before create the initial context to indicate to return personalized value, as follows:
    env.put(IPcdContext.PCD_PERSONALIZATION_PRINCIPAL, request.getUser());
    Hope this helps.
    Daniel

  • Clear text  password - how to send it from java.

    I am trying to reset the password of a user from java.
    So I have to open a socket connection to Unix box and send a packet in following format
    "<adminUserid> <adminPassword> PASSWORD <target-userId> <new-passwd>\n"
    So they say that user credentials are to be send in cleartext
    Please tell me how i can send above string as cleartext
    thanks in advance.
    Renjith.

    But this is not working for me , UNIX gurus please help
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    import java.io.BufferedWriter;
    import java.io.OutputStreamWriter;
    import java.io.IOException;
    public class TestUnix {
    public static void main(String args[] ) {
         try {
                 InetAddress addr = InetAddress.getByName("x.x.x.x");
                 int port = 6546;
              System.out.println("Address IP : "+addr);
                 // This constructor will block until the connection succeeds
                 Socket socket = new Socket(addr, port);
              BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
              String command = "<Admin><admin-pwd>PASSWORD<user><user-pwd>\n";
              System.out.println(command);
                     wr.write(command);
                 wr.flush();
              socket.close();
              System.out.println("Finished executing");
             } catch (UnknownHostException e) {
             } catch (IOException e) {
    }

  • How to assign ROle to user

    Hello All,
      I need to programmatically assign roles to user and want to give some authorization at runtime..
    please suggest me which function module to use ..
    please help me asap
    thanks,
    jigs
    helpful answers wil lbe rewarded

    Hi all,
    Thanks for the reply.
      But i want to add one role to user not profile.
      i got one bapi BAPI_USER_ACTGROUPS_ASSIGN, this bapi does work...
    but actually deletes previous roles and then assign new one.
    is there any fm which will add role to user without deleting existing role.
    thanks,
    jigs

  • How can I call ora:appendToList from java snippet?

    I want to assign a list of user from User Task A to User Task B, but I don't know how to call ora:appendToList from java snippet, and are there any better ways to solve this situation?

    Hi Rakesh,
    Thank you for your help.
    For issue 1, for example, user jcooper apply a vacation, and the request goes to his manager jstein,
    and jstein dispatch the task to mtwain and rsteven for parallel approval, (this is just for example, in
    some case, the manager can use the reassign function), so I use simple workflow pattern for manager approval,
    and parallel workflow pattern for parallel approval, but in my situation, the user for parallel approval is
    uncertain, need select by manager jstein, so I want to know how to assign the user from java code to bpel process.
    The following is how I solve the problem now, put the user list string in flexString1 of simple workflow task,
    then allocate the array for parallel assigneeUsers, then use setVariableData assign the value, it can do the job,
    but the code is awful, I want to know how to do it in some better way.
    <assign name="copyPayloadFromTask">
    <copy>
    <from expression="ora:countNodes( 'inputVariable','task','/task:task /task:assigneeUsers')"/>
    <to variable="currentLength"/>
    </copy>
    </assign>
    <sequence>
    <bpelx:exec name="Java_Embedding_2" language="Java" version="1.4"><![CDATA[
    Element ele=(Element)getVariableData("inputVariable","task","/task:task/task:flexString1");
    String users=ele.getNodeValue();
    String[] userArray=users.split(",");
    setVariableData("arrayLength",new Integer(userArray.length));
    ]]>
    </bpelx:exec>
    <while name="While_1" condition=" (bpws:getVariableData('currentLength')) &lt; (bpws:getVariableData('arrayLength')) ">
    <assign name="Assign_1">
    <copy>
    <from expression="ora:appendToList('inputVariable','task',' /task:task/task:assigneeUsers', string( 'test'))"/>
    <to variable="oraBPMTemporaryVariable"/>
    </copy>
    <copy>
    <from expression="ora:countNodes( 'inputVariable','task','/task:task /task:assigneeUsers')"/>
    <to variable="currentLength"/>
    </copy>
    </assign>
    </while>
    <bpelx:exec name="Java_Embedding_1" language="Java" version="1.4"><![CDATA[
    Element ele=(Element)getVariableData("inputVariable","task","/task:task/task:flexString1");
    String users=ele.getNodeValue();
    String[] userArray=users.split(",");
    for(int i=0;i<userArray.length;i++){
    setVariableData("inputVariable","task","/task:task/task:assigneeUsers["+(i+1)+"]",userArray);
    }]]>
    </bpelx:exec>
    Thanks,
    Ming

  • Add UME Role to LDAP User

    Hi,
    i'm having a problem with portal user management. We have a LDAP user called charlie81 in an Active Directory Server, which has a set of LDAP groups. We have also a UME Role (a role created in the portal) called "Manutenzione". Our target is to assign "Manutenzione" to charlie81 through the portal. I made it but when charlie81 is logged in, he can see only LDAP Roles; "Manutenzione" is not visible!!!! How can i resolve this problems? Do you help me, please? Thank you in advance, Carlo Paglia

    Hi,
    What kind of role did you assign to the user? A portal role (source = portal role) or a "UME role" (source = UME database)?
    If it's a portal role, is it a standard or a custom role? If it is a custom portal role, make sure an entry point is defined or your role won't be visible. Here's a link to the documentation : [Defining Entry Points|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/4e/3e703e632c7937e10000000a114084/frameset.htm].
    Regards,
    Pierre

Maybe you are looking for

  • Function for Adding  Attachment to invoice post.

    I have a report to read txt files, and post vendor or customer invoice documents with BAPI_ACC_DOCUMENT_POST. now with the txt file i have a pdf file to attach . how can i do that?  thanks , pd.: sorry my english.

  • Consuming third party web service in CE7.1.

    Hi Experts, I want to consume a third party webservice in NWDS 7.1. I have wsdl URL. Please help me by stating steps what all i need to do. Is there any doc/blog in place? While searching I came across a blog Link: [https://www.sdn.sap.com/irj/scn/in

  • WEB.SHOW_DOCUMENT , FRM-92020 Prevention

    Hi, I have a forms module where the user can specify a URL and then press a button to launch it using the WEB.SHOW_DOCUMENT procedure. If the user doesn't enter a valid URL, they get a message something like: "frm-92020 Invalid URL C:\temp\test.htm s

  • Dbms_output problem

    I am running oracle 8i on linux (mandrake 6) and have applied the patch. While playing around with some simple triggers etc I attempted to use the dbms_output.put_line('stuff here') to keep track of, and report on events as they happened. The problem

  • Highlighting JList Items

    Hello Could anybody let me how to change the color of Few Items of JList. I know how to change the foreground color of an item which is selected. But, I need to show few items of JList in different color. Thanks in advance