BBIS User Creation

Editor’s note: this blog post was written with BBIS 2.94 and earlier in mind.  3.0 and later versions made substantial changes to the username and password model, and this article is not helpful against versions 3.0 and higher.

 

Today I had a request from someone to facilitate a bulk upload of users into BBIS.

Not to sound too much like Apple, but “there’s a script for that”.

It goes like this (you can sing along if you want to):

 

--creates users in BBIS
declare
  @newusername nvarchar(100) = null
 ,@newfirstname nvarchar(100) = null
 ,@newlastname nvarchar(100) = null
 ;
--repeat this block for each user, changing the user name each time.
--This will create the user with a password of “P@ssw0rd1!”.
/*BEGIN: Block to repeat for each user*/
set @newusername = 'username1';
if not exists(select * from dbo.CLIENTUSERS where UserName = @newusername) begin
  set @newfirstname = 'User';
  set @newlastname = 'Name';
  exec dbo.spAddUpdate_ClientUsers @PKID=-1,@CurrentUsersID=1,@Password=N'6/PY7AnhODEMrY0CnUSo+g==',
         @UserName=@newusername,@EMail=N”,@Active=1,@LastName=@newlastname,@FirstName=@newfirstname,
         @MiddleInitial=N”,@InternalUser=0,@ClientsID=1,@BackofficeID=0,@BackOfficeSysID=0,
         @RegistrationNumber=N”,@ReminderPhrase=N”,@IsSupervisor=1,@IsProvisional=0,
         @TimeZoneID=155,@Guid='00000000-0000-0000-0000-000000000000';
end;

But as we worked through this, it became evident that an easier-to-use bulk upload method would be a good thing to have around.

So I created a small (and ugly!) WinForms application that will do the following:

Take the following:

1 – A server and database name

2 – A list of usernames

3 – A list of clear text passwords

 

And create BBIS users for each username/password combination.

As an added bonus, if you paste encrypted passwords into the “passwords” list, there is a button to decrypt them into plaintext as well.

You can download that solution as a zip file here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s