How to create a new user using SIM API
Hi,
I would like to create a user on SIM using the API. I have created a remoteSession object. I need to know how to proceed further. I want to create a user and assing him some resources. Please let me know what methods need to be called in order to create a user and assign him resources.
Thanks!
# 1
Use the following code snippet to start with creating a user
WSUser wsUser = new WSUser();
wsUser.setAccountId(name);
wsUser.setPassword(new com.waveset.util.EncryptedData("password"));
com.waveset.server.InternalSession session = new com.waveset.server.InternalSession();
LighthouseContext ctx = session.getAuthenticatedContext("Configurator");
java.util.Map maps = new java.util.HashMap();
maps.put("authorized","true");
ctx.checkinObject(wsUser,maps);