cancel
Showing results for 
Search instead for 
Did you mean: 

How to create MDM users using Java APIs

Former Member
0 Kudos

Hi SDNers,

Can you please guide me on steps for creating users in MDM using SAP MDM Java APIs.

Thanks,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos
What kind of help you need?
it is just a api call ...
com.sap.mdm.security.commands.CreateUserCommand

Answers (2)

Answers (2)

Former Member
0 Kudos

Ravi,

Below are the steps to create a user in MDM repository, using new MDM Java API:

1. Create repository session context using RepositorySessionContext class.
2. Create Session using SessionManager class.
3. Add all the required user properties using UserProperties class and its setter methods.
4. Use CreateUserCommand class to create user. Set session, user properties and execute command.

Note: You will need to set change stamp before executing create user command. You can retrieve ChangeStamp from the object of GetUserListCommand class.

Thx/ -Tarun

Former Member
0 Kudos

Hi Ravi,

Please check below packages:

' com.sap.mdm.security'

' com.sap.mdm.security.commands'

There is a class user properties in the 1st package. Create the object of the class ( by setting the mandatory function parameters like set userID(), userName(), Password etc)

Use this method in the methods of the class CreateUserCommand.

Below link will be helpful for you:

http://help.sap.com/javadocs/mdm/sp06/com/sap/mdm/security/commands/CreateUserCommand.html

Thanks & Regards,

Namrta Mahajan

Also check RepositoryAccessPermissions.Objects class in the same package.

Former Member
0 Kudos

Thanks Namrta and John!

I wanted to have the knowledge of basic flow and the classes involved.

I will revert with results.

Thanks,

Ravi