Hello,
In the previous version (XI R3) I used CrystalReport libraries to talk to BusinessObjects. When wanting to create an user in BO programmatically, I used the code you can see belowhand.
Recently we have purchased BI 4.1 and I'm trying to translate all old code and calls to the new version of the software, trying to always use RESTful services to talk to BI.
Is there any way of creating/deleting a BO user with RESTful services? I haven't found any documentation about this. If it is not possible, how would you suggest to go on about doing it? I work in a .NET(C#) environment.
Thanks and kind regards,
Enrique
InfoStore boInfoStore;
InfoObjects boNewUserObjects;
InfoObject boNewUserObject;
PluginInfo boUserPlugin;
CrystalDecisions.Enterprise.Desktop.User boUser;
//String groupName = userGroupName;
//string query = "";
EnterpriseSession enterpriseSession = null;
SessionMgr sessionMgr = new SessionMgr();
enterpriseSession = sessionMgr.GetSession(sEnterpriseSession);
boInfoStore = GetInfostore(connectionString, enterpriseSession);
//grab the shortcut plugin's info
boUserPlugin = boInfoStore.PluginManager.GetPlugins("Desktop")["CrystalEnterprise.User"];
//create a new user info object with the shortcut plugin
boNewUserObjects = boInfoStore.NewInfoObjectCollection();
boNewUserObject = boNewUserObjects.Add(boUserPlugin);
//grab the plugin interface
boUser = new CrystalDecisions.Enterprise.Desktop.User(boNewUserObject.PluginInterface);
//populate the user object with properties
//Login
boNewUserObject.Title = newLogin;
//Connection type
boUser.Connection = CeConnectionType.ceConnectionConcurrent;
//Fullname
boUser.FullName = fullName;
string newPassword = getBOPassword(Convert.ToInt32(personID));
//Password
boUser.NewPassword = newPassword;
//Password expiration
boUser.PasswordExpires = false;
//Password allow change
boUser.AllowChangePassword = false;
//DEscription du user
boUser.Description = "SHADOW";
//SAVE the changes to the Infostore
boInfoStore.Commit(boNewUserObjects)