BusinessObjects Board

Bulk create 1200+ enterprise accounts

I need to bulk create 1200+ enterprise user accounts (currently in an XLS), before I start working on the codeto do this I would like to know if anyone has already created this utility and is willing to share.

Thanks!


cpare :us: (BOB member since 2008-10-06)

Might be easier to add to delimited file and use the Import Wizard to bulk add. Have accomplished this successfully with several thousand users in the past.

There is a guide for the import wizard that gives you the spec for the file. It’s straightforward.


Eric Vallo :us: (BOB member since 2002-08-15)

yes, I think the best way, at it has been said, is using the import wizard and a text file. have a look on documentation about the text file format to provide. Regards

Bernard


bernard timbal :fr: (BOB member since 2003-05-26)

This is not free, but it may be interesting for you to look up BOInterface. The Admin module allows you to create a script for that pretty easily.

M


M :de: (BOB member since 2003-11-25)

I tried this option and able to create users and groups.

  1. How can I set password for these users.
  2. Created user pointing to concurrent license option. How can it be made default to Named User.

Thanks


avbaby :india: (BOB member since 2009-05-09)

Depends on the version of XI. In XI R2, go to the Admin Tools page and bulk update groups of users. In XI 3.x, it’s one of the right click options on a group in the CMC. You’ll be doing yourself a favor if all these users are in a group by themselves, but more so if you do this in the import file using the Import Wizard.


Eric Vallo :us: (BOB member since 2002-08-15)

How about using this free utility.

Let us know


Diamond :india: (BOB member since 2009-08-26)

The problem with Import Wizard is how to set the password, the default is blank, which is security risk. In my environment, we use trusted authentication over IIS, so enterprise password is not used. I wrote a vba code to randomize the user passwords so users must use WinAD authentication.


fisher (BOB member since 2009-04-23)

yeah … fisher is right… … I think I may have written VBA code to import from Excel and also have “force password change on next logon”… if you need help… please contact me via private message


RedLineE90 (BOB member since 2008-06-12)

I wish I could PM you RedLine90 but it says I don’t have enough posts to do that yet. I would VERY much be interested in your script that automates what you said it does. If I could get this script from you I would be VERY grateful. Thanks again!


CMS_BO_Security (BOB member since 2009-09-23)

Hi all,
I wonder if anyone has done this for BO4.0??

RedLineE90,
Do you mind if you could share the script?

Thanks.


ccool2000 :malaysia: (BOB member since 2008-12-09)

Yes. I did for a client in BI 4.0 as batch file in java routine. if you are familiar about java SDK, its easier…


RadN :us: (BOB member since 2003-04-28)

Hi RadN,
Anywhere I could possibly refer to? Any sample scripts, perhaps?

I also wonder if there is anything like Query Builder from the XI3.0 version.
A million thanks if you could show me the light!

:crazy_face:


ccool2000 :malaysia: (BOB member since 2008-12-09)

Here is the sample script for creating new user.

public void createUser(IInfoStore infoStore){
try
{
IPluginMgr pluginMgr = infoStore.getPluginMgr();
IPluginInfo userPlugin = pluginMgr.getPluginInfo(“CrystalEnterprise.User”);
IInfoObjects newInfoObjects = infoStore.newInfoObjectCollection();
newInfoObjects.add (userPlugin);

		IInfoObject iInfoObject = (IInfoObject) newInfoObjects.get(0);
		IUser BOEUser = (IUser) iInfoObject;

		//Title means user account name as ID
		BOEUser.setTitle ("End User");
		//specfy user type as NAMED/CONCURRENT
		BOEUser.setConnection(IUser.NAMED);
		BOEUser.setNewPassword("Password");
		infoStore.commit (newInfoObjects);
	}catch(Exception e){
		e.prinstacktrace();
	}
}

You can read file for entire users or some other location and loop over for all users.


RadN :us: (BOB member since 2003-04-28)

Hi RadN,

Thanks for the script. I shall work on that. Cheers!


ccool2000 :malaysia: (BOB member since 2008-12-09)

Hi RadN,
Sorry, I’m not familiar with pushing scripting into BO.

Do you mean you did as batch file in java routine for you to execute the script? Can I say that I must have the Java expertise to do this? And is there any URL/documents a novice could refer to?

Please help. Thank you.


ccool2000 :malaysia: (BOB member since 2008-12-09)

Make it .exe using java and use it in batch file… you need good at java but not expert. if you want help, email me…

Thanks
Rad


RadN :us: (BOB member since 2003-04-28)

Thanks, RadN.
Will try to work on that :wink:
You’ve been very helpful.


ccool2000 :malaysia: (BOB member since 2008-12-09)

If any one looking for C# code for creating a new user here is what I used which worked in XI R2 and XI 3.1:


        public bool AddUser(string psUserName, string psFirstName, string psLastName, string psEmail, string psPassword)
        {
            InfoStore myInfoStore = ConnectToBOServer();

            try
            {
                     // Add the user in BOE
                    PluginManager myPluginManager = myInfoStore.PluginManager;
                    PluginInfo myPluginInfo = myPluginManager.GetPluginInfo("CrystalEnterprise.User");

                    InfoObjects myInfoObjects = myInfoStore.NewInfoObjectCollection();
                    myInfoObjects.Add(myPluginInfo);

                    InfoObject myInfoObject = myInfoObjects[1];
                    CrystalDecisions.Enterprise.Desktop.User myUser = (CrystalDecisions.Enterprise.Desktop.User)myInfoObject;

                    myUser.Title = psUserName;
                    myUser.FullName = string.Format("{0} {1}", psFirstName, psLastName);
                    myUser.EmailAddress = psEmail;
                    myUser.Description = psUserName;
                    myUser.Connection = CeConnectionType.ceConnectionConcurrent;
                    myUser.PasswordExpires = false;
                    myUser.ChangePasswordAtNextLogon = false;
                    myUser.AllowChangePassword = false;
                    myUser.NewPassword = psPassword;
                    myInfoStore.Commit(myInfoObjects);

                    myUser.Dispose();
                    myInfoObject.Dispose();
                    myInfoObjects.Dispose();
                    myPluginInfo.Dispose();
                    myPluginManager.Dispose();
                
                return true;
            }
            catch (Exception)
            {
                return false;
                throw;
            }
            finally
            {
                myInfoStore.EnterpriseSession.Logoff();
                myInfoStore.Dispose();
            }

        }

Hope this helps someone.


RCH (BOB member since 2004-11-11)