hii have successfully created the multi tenant users with following code
@Override
public boolean createTenantUser(String domain, String username, String password, Map<String, String> properties) {
logger.debug("creating tenant user");
boolean createdUser = true;
try {
AuthenticationUtils.startSession( ("admin@" + domain), TENANT_ADMIN_PASSWORD);
AdministrationServiceSoapPort userService = WebServiceFactory.getAdministrationService();
NamedValue[] attributes = new NamedValue[] {
new NamedValue(Constants.PROP_USER_FIRSTNAME, false, properties.get("firstName"), null),
new NamedValue(Constants.PROP_USER_LASTNAME, false, properties.get("lastName"), null),
};
NewUserDetails newUserDetails = new NewUserDetails( (username + "@" + domain.toLowerCase()), password, attributes);
NewUserDetails[] arrNewUserDetails = {newUserDetails};
UserDetails[] createdUserDetails = userService.createUsers(arrNewUserDetails);
logger.debug("created tenant user with details " + createdUserDetails);
} catch (AuthenticationFault e) {
logger.error(e.getMessage(), e);
createdUser = false;
} catch (Exception e) {
logger.error(e.getMessage(), e);
createdUser = false;
} finally {
AuthenticationUtils.endSession();
}
return createdUser;
}
but the problem is that the home folder name is automatically set like 'user1@domain'; that was not desirable.i wanted to create the home folder like the same as usernameso i added the following code but that still didn't worked
new NamedValue(Constants.PROP_USER_HOMEFOLDER, false, ("/" + username), null),
can some body give me how to create a home folder with the same as username under user homes