on 05-20-2011 9:16 AM
Hi all,
I am working on a web service in order to modify the password expiration date.
In particular, they requested me to set password never expires at user's creation moment.
I wrote something like this:
uacc = UMFactory.getUserAccountFactory().newUserAccount(susUserName, newUser.getUniqueID());
uacc.setPassword(susUserPassword);
uacc.setPasswordChangeRequired(false);
but users continue to be created with the usual password expiration date.
I tried to search something in my library that could help me, but with no luck. In particular, I tried using the method setPasswodExpirationDate of ISecurityPolicy and of class SecurityPolicy, but I cannot find a method to link this methods to user account. I have also seen that changing the security policy to "Technical User" I may overcome the problem, but the method setSecurityPolicy is not implemented in the libraries on server.
Could you please give me some advices on this topic? I really do not have anymore ideas.
Best Regards,
Francesco Macaluso
Use the below code to set your user as technical user.
IUserAccountFactory uaFactory= UMFactory.getUserAccountFactory();
IUserAccount userAccount=uaFactory.getUserAccountByLogonId("<userID");
IUserAccount mutableUserAccount=uaFactory.getMutableUserAccount(userAccount.getUniqueID());
mutableUserAccount.setAttribute("com.sap.security.core.usermanagement","SecurityPolicy",new String[]{IUserAccount.SECURITY_POLICY_TYPE_TECHNICAL});
mutableUserAccount.commit();
Thanks
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.