cancel
Showing results for 
Search instead for 
Did you mean: 

Need Script/Excel Macro for Deletion of Bulk users from Enterprise BO 3.1

Former Member
0 Kudos

Hello All,

I am planning to delete the Bulk Users (2500) from environment, I need a script or Excel Macro to perform it in my environment.

Please someone provide the JSP script or Excel Macro to perform the activity. Thank you so much in advance.

Thanks,

Srikanth Y

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Srikanth,


There are many scenarios by which you can delete users in bulk using SDK. One such scenario, I am sharing over here.

Attached is a sample code which deletes the users by reading the list from a txt file.

The text file has to be placed in the C: directory with one username per line.

You can get the required username list from the query builder.

Hope this helps.

Thanks,

Prithvi

Former Member
0 Kudos

Hello Prithvi,

Thank you so much for your prompt response.

Can you please provide me the steps to perform in environment? Yes, I have the inactive User List.

Where should I place and how to run this script in environment? do i need to rename this to .jsp and need to place it in InfoViewApp war file under the webapps folder and need to run it from IE?

Thanks,

Srikanth

Former Member
0 Kudos

Hello Prithvi,

It will delete the Users which we have mentioned in Userlist.txt right because just we want to delete the inactive users not an active users and I hope it won't impact anything in environment.

Please provide your suggestions, Thank you.

Regards,

Srikanth

Former Member
0 Kudos

You should have the list of inactive users.Right?

It will always read the usernames from the txt file which will be entered by you and delete those user accounts.

You would need to save the attached sample as .jsp and can place it inside InfoViewApp application.

Also it would be best to test the code in a DEV/TEST environment before you actually try to touch your prod systems.

Try for few user accounts first and check the status.

Also it would be apt to take a back of your CMS DB before you run any script so that you can rollback to a save point.

Thanks,

Prithvi

DellSC
Active Contributor
0 Kudos

I would also back up the FileStore.  When you delete users, the system will also delete everything that's in their Favorites folders.  So, if there's an issue where you need to restore, you'll need both the DB and the FileStore to get everything back.

-Dell

Former Member
0 Kudos

Thank you so much Prithvi..

Sure, before implementing it in Production will test it in Sandbox.

Will let you know if I face any issues for the same.

Thanks,

Srikanth 

Former Member
0 Kudos

Yes I agree as The users may maintain the objects in Inbox and Personal folders but if we can see the users who all are not logged since many days in environment, I hope we no need to maintain the Users right?

DellSC
Active Contributor
0 Kudos

Backing up is a safety thing, just in case you delete someone you shouldn't have.

-Dell

Former Member
0 Kudos

Hello Prithvi,

I want to disable the "N" no of users before deletion of "N" no of users, do we have any script to disable the multiple users at a time in XIr3 (BO 3.1)? if yes, can you please provide the same.

Also, regarding the deletion of Bulk users deletion, hope you tested the script from your end.

Thank you in advance.

Regards,

Srikanth Y

Former Member
0 Kudos

Hello Srikanth,

Attaching the sample for diabling all users except admin and guest.

Change the query in the code or modify the code as per your requirement.

Yes, I had tested the delete bulk users in my environment, but you still need to rely on your testings.

Thanks,

Prithvi

Former Member
0 Kudos

Thank you Prithvi.

As per the below query, the Admin and Guest accounts won't be disabled right?

users = infoStore.query("SELECT * " + " FROM CI_SYSTEMOBJECTS " + " WHERE SI_KIND='User' " + " and SI_NAME not in ('Administrator', 'Guest')");

So, in the query i need to update the USER ID's which I am not planning to disable, so that the active Users won't be disabled.

Suggest me.

Thanks,

Srikanth

Former Member
0 Kudos

Try o run the query in query builder(Admin Tools) application.

When you run the above query it will return all the user accounts aprt ropm admin and guest.

The list of users you get as an output in the query builder will be disabled if above query is run.

Now you would need to construct a SQL query as per your users list and use that query in the code.

Thanks,

Prithvi

Former Member
0 Kudos

Should we run it as program object?

Im getting erros while doing it

Former Member
0 Kudos

A main Java class needs to be specified to run the program

Do we need to make any changes to script?

Former Member
0 Kudos

We have got the problems solved

Former Member
0 Kudos

Hi Prithiviraj,

Thank you for the scripts. Do you have script to extract the list of  ACTIVE BO users. We  just need the Active user list who are currently using the BO environment (Not the active session).

Regards,

Nivedita

former_member204024
Participant
0 Kudos

Hi Nivedita,

You can run the following query to get the last logged in time for an user.

select SI_UPDATE_TS from ci_systemobjects where si_kind ='User' and si_name ='Administrator'.

From this you can determine who are all active.

If you have audit enabled in your system, then you can also get this from the activity universe.

Regards,

Subramanian S.

Former Member
0 Kudos

Can you post here what was done to solve the error message ?

A main Java class needs to be specified to run the program

Former Member
0 Kudos

we have run the scripts as .jsp from admintools.

Former Member
0 Kudos

You would need to specify the class name in program objects parameters to resolve the error. The class name should match the exact case of your java class which is published as a program objects.

Thanks,

Prithvi

Former Member
0 Kudos

Thanks a lot Prithvi !

Answers (0)