cancel
Showing results for 
Search instead for 
Did you mean: 

creation portal user error

0 Kudos

hi,

when I try to create a new portal user with

IUserAccount account = accountFact.newUserAccount(
puid.trim(),userMaint.getUniqueID());

I get this error:

com.sap.security.api.UMException: Namespaces, attributes and values must not contain leading or trailing spaces.

how can fix it?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Try the below code snippet instead. Much easier. Just get a user factory. Create the mutable user object and then update the properties of it. When you're done commit() it.


    	IUserFactory userFactory = UMFactory.getUserFactory();
    	IUserMaint userMaint = null;
    	try {
	  userMaint = userFactory.newUser("your_new_users_id");

Craig