Hi,
I am trying to create users using the following code. The issue that I am facing is that when I try to login to the system it gives me an error that I cannot log in with my credentials. But when I go to the user form and click edit and without changing anything press the save button then the user works fine.
Could you please help me find out what am I missing in the below Code?
UserInfo userInfo;xAxaptaUserManager Axmanage;xAxaptaUserDetails Axdetails;Boolean ret = false;Axmanage = new xAxaptaUserManager();userInfo.initValue();userInfo.accountType = UserAccountType::ClaimsUser;userInfo.networkAlias = networkAlias;userInfo.networkDomain = networkDomain ;userInfo.id = userId;userInfo.name = userName;userInfo.company = defaultCompany;userInfo.enable = NoYes::Yes;userInfo.helplanguage = 'en-Us';userInfo.language = 'en-Us';Axdetails = Axmanage.getSIDFromName(userInfo.id, userInfo.NetworkDomain, UserAccountType::ClaimsUser);userInfo.sid = Axdetails.getUserSid(0);userInfo.ObjectId = SysSecurity::getUserObjectIdForPrincipalName(userInfo.NetworkAlias);userInfo.insert();