Skip to Content
avatar image
Former Member

Create portal user using UME api's

Is there an example whicg explains how to create a portal user using the UME api's ? We would like to develop a Web Dynpro app for adding users in batches. See a bunch api's in the NWDS documentation which deals with user account maintanence, profile look-up etc., but none for creating users. Please advise.

Thanks !

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Nov 14, 2005 at 08:07 PM


    see /thread/47272 [original link is broken]

    Hope it helps


    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 15, 2005 at 09:48 AM

    Hi Srikanth,

    Before using this code add the security.api jar file to your project's buildpath. For that, in your NWDS, navigate to Your_project->properties->Java Build path->Libraries->Add variable->Click on Eclipse Home->extend->plugins->>lib->

    <b>creating a new user, user account & assigning this user to a role</b>

    // creating a user

    IUserFactory userfact = UMFactory.getUserFactory();

    IUserMaint userMaint = userfact.newUser("TestUser");

    userMaint.setDisplayName("My Name");




    // assigning a role (in this case 'administrator') to the user

    IRole role = null;




    wdComponentAPI.getMessageManager().reportSuccess("Adding User::"userMaint.getName()" to role ::"+role.getDisplayName());



    // creating an account for the user

    IUserAccountFactory accountFact = UMFactory.getUserAccountFactory();

    IUserAccount account = accountFact.newUserAccount("MyLogonID",userMaint.getUniqueID());



    Now you will be able to login with user name 'MyLogonID' and password 'password'.

    Hope this helps,

    Best Regards,


    Add comment
    10|10000 characters needed characters exceeded