BusinessObjects Board

Get User Group Details From CMS repository SAP BI4.1

Hi All,

I have developed an utility which will fetch the user group details from the SAP Business Objects repository and will provide the output in the excel format.

I have developed this utility using the JAVA SDKs which uses the libraries of SAP Business Intelligence 4.1 version.

In order to use this utility with your SAP Business Objects servers, please follow the steps below.

Step 1: Download the attached zip file and extract it. It has the JAR file.

Step 2: Configure the CLASSPATH variable for the below libraries on the system where you will run this utility.

Required Libraries can be found at :
C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\lib

Dependent Libraries can be found at :
C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\lib\external

Step 3: Copy this utility to the same folder where you have copied above libraries and set the CLASSPATH variable for this utility as well.

Step 4: Open the command prompt and run the following command.

Command:

java.exe -classpath %CLASSPATH% UGDetailsM 10.10.254.183 administrator password "F:\JavaOutput\UserGroupDetails.xlsx"

Points to note for running the above command:

  1. UGDetailsM is the class name which needs to be used in the command as it is. It is case sensitive so please use it as it is.
  2. Provide the IP address for SAP Business Objects server.
  3. Provide the Username/Password to login to SAP Business Objects server.
  4. Provide the file name along with the extension of excel file in double quotes.
  5. File name and Path can be anything.
  6. This utility will only work with enterprise authentication since I have hard coded it in the source code.

Step 5: Generated excel file would be in the below format.

[list]User ID
Full Name
Email Address
Status
Last Logon Time
Creation Time
License Type
Group Details[/list]

This utility is tested with SAP Business Intelligence 4.1 version only. I am going to develop the same utility for SAP Business Intelligence 4.2 and SAP Business Objects 3.1 versions as well and will share it soon.

Please use this utility and share your views.

Thanks,
SPY
UserDetailsSAPBI41.zip (7.0 KB)


Swapnil_Yavalkar (BOB member since 2012-03-15)

Moved to the Downloads forum, thanks.


Dave Rathbun :us: (BOB member since 2002-06-06)

Hi,

I am getting an error saying

Error: Could not find or load main class UGDetailsM.

I’m sure I’ve done everything as explained.

Any tips?

Thanks,
Ainsley


aposullivan :australia: (BOB member since 2004-07-23)

Hi Ainsley,

Try this https://www.dropbox.com/s/b8ugfvjbpzu7yv1/UserDetailsSAPBI41-V3.zip?dl=0

Download this file and run it directly. This new file would not need any classpath variable to be set as I have already included required libraries in this JAR file.

Command:

java.exe –jar jarfilename BOServerIP Userid Password

~SPY


Swapnil_Yavalkar (BOB member since 2012-03-15)

Hi Spy,

this is the command I typed in:
java.exe –jar 192.168.206.232 Administrator “C:\Users\k09179\Documents\UserGroupDetails.xlsx”

That correct?

TIA


aposullivan :australia: (BOB member since 2004-07-23)

Hi Tia,

You would need to extract the downloaded zip file and go to the same folder in command prompt.

E.g. If you saved this extracted zip folder in C:\UserDetailsSAPBI41-V3 then go to this folder location in the command prompt and run the following command.

Commnad should be as below:

JAVA.exe -jar UserDetailsSAPBI41-V3.jar BOServerIP username “Password”

Please do not specify the file path in the command.

In your case, command should be as below:

java.exe –jar UserDetailsSAPBI41-V3.jar 192.168.206.232 Administrator

~SPY


Swapnil_Yavalkar (BOB member since 2012-03-15)

Can we run this on machine having BO client installed?


aniketp :uk: (BOB member since 2007-10-05)

I tried using it on BI client machine but it throws errors -

Could not find or load main class? jar

Can you please guide me how to correct it?


aniketp :uk: (BOB member since 2007-10-05)

Unzipped the Jar file from the dropbox and using the command prompt at the location where i unzipped the file i executed the following command

C:\Users\CON0070\Downloads\UserDetailsSAPBI41-V3>java.exe -jar UserDetailsSAPBI
41-V3.jar Administrator

I encountered the same error

Error: Could not find or load main class ?jar

I also copied the lib files from the BO server and place in the same folder and executed the command with no success.

Thanks
Arun


passport (BOB member since 2010-05-07)

Hi Arun,

I apologize for the delayed response. I have not used this forum since long.

Please use the link below to download a new file, this file does not need any BI client installed and class_path to be set on the system from where you will run it.

https://www.dropbox.com/s/b8ugfvjbpzu7yv1/UserDetailsSAPBI41-V3.zip?dl=0

Please follow the below steps to use this new JAR file.

  • Download this new jar file.
  • Extract it and go to the same folder in command prompt.
  • Run the following command.

Command:

C:>java.exe -jar UserDetailsSAPBI41-V3.jar BOServerIP administrator Password

Hope this would be helpful.

~SPY


Swapnil_Yavalkar (BOB member since 2012-03-15)

i am still getting error

C:\temp>java.exe -jar UserDetailsSAPBI41-V3.jar XX.XX.XX.XXXX administrator xxxxxx
Exception in thread “main” java.lang.UnsupportedClassVersionError: JVMCFRE003 ba
d major version; class=UGDetailsM, offset=6
at java.lang.ClassLoader.defineClass(ClassLoader.java:364)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:15
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:777)
at java.net.URLClassLoader.access$400(URLClassLoader.java:96)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1225)
at java.security.AccessController.doPrivileged(AccessController.java:366
)
at java.net.URLClassLoader.findClass(URLClassLoader.java:660)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:942)
at java.lang.ClassLoader.loadClass(ClassLoader.java:851)
at java.lang.ClassLoader.loadClass(ClassLoader.java:827)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:237)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:56)


reddyvmk (BOB member since 2005-05-28)

Could you please confirm the JAVA version you are using on your system?

I will have to compare it with the version of JAVA which was used to compile this utility.

~SPY


Swapnil_Yavalkar (BOB member since 2012-03-15)

THanks


ash0550 :canada: (BOB member since 2011-09-12)

Hi,

I have checked this but did not find any option which shows the date/time for last password change. BI does not have any property set for fetching this information at the user level.

Regards,


Swapnil_Yavalkar (BOB member since 2012-03-15)

Thanks for the tool! I attempted to run this on our BI 4.2 SP4 dev and test systems, however, I was getting the following errors (we have Java 1.8.0_131):

Initiating CMS Connection.....
com.crystaldecisions.sdk.exception.SDKServerException: Internal error.
cause:com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.se
agatesoftware.com/OCA/oca_abuse:3.2
detail:Internal error.
The server supplied the following details: OCA_Abuse exception 22273 at [channel
mgr.cpp : 153]  42254 {}
        ...setPeerPublicKeyFromBlob failed  (keyagree.cpp,76)
        at com.crystaldecisions.sdk.exception.SDKServerException.map(SDKServerEx
ception.java:99)
        at com.crystaldecisions.sdk.exception.SDKException.map(SDKException.java
:124)
        at com.crystaldecisions.sdk.occa.security.internal.ConfidentialChannelSe
rvice.createConfidentialChannel(ConfidentialChannelService.java:150)
        at com.crystaldecisions.sdk.occa.security.internal.CCMap.locateCCItem(CC
Map.java:63)
        at com.crystaldecisions.sdk.occa.security.internal.LogonService.doUserLo
gon(LogonService.java:845)
        at com.crystaldecisions.sdk.occa.security.internal.LogonService.doUserLo
gon(LogonService.java:805)
        at com.crystaldecisions.sdk.occa.security.internal.LogonService.userLogo
n(LogonService.java:210)
        at com.crystaldecisions.sdk.occa.security.internal.SecurityMgr.userLogon
(SecurityMgr.java:166)
        at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBo
dy0(SessionMgr.java:454)
        at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBo
dy1$advice(SessionMgr.java:512)
        at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon(SessionM
gr.java:1)
        at com.external.spy.common.utilities.users.InitCmsExcel.initCMSConnectio
n(InitCmsExcel.java:58)
        at UGDetailsM.main(UGDetailsM.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:i
mg.seagatesoftware.com/OCA/oca_abuse:3.2
        at com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuseHelper.
read(oca_abuseHelper.java:106)
        at com.crystaldecisions.enterprise.ocaframework.idl.OCA.OCAcc._ConfChann
elStub.Create(_ConfChannelStub.java:76)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.crystaldecisions.enterprise.ocaframework.ManagedService.invoke(Ma
nagedService.java:356)
        at com.crystaldecisions.sdk.occa.security.internal._ConfChannelProxy.Cre
ate(_ConfChannelProxy.java:57)
        at com.crystaldecisions.sdk.occa.security.internal.ConfidentialChannelSe
rvice.establishConfidentialChannel(ConfidentialChannelService.java:185)
        at com.crystaldecisions.sdk.occa.security.internal.ConfidentialChannelSe
rvice.createConfidentialChannel(ConfidentialChannelService.java:145)
        ... 15 more

After some investigation, I found this note about SP4, "I had a similar issue when I tried to connect to the server with my custom application. After some investigation I found out that the version has some security updates. There is a SAP Note #2433337 – Security enhancements in SAP BusinessObjects BI Platform 4.2 SP04 which describes the changes.

This note contains a paragraph for custom SDK applications. Maybe this will help you. My issue was solved after I’ve replaced the referenced jar files with latest versions."

We have not yet patched our Production environment to SP4, so I am getting some success in running it there, but it is taking a loooooong time. I assume this is normal? We only have about 900 users in Prod.


agerrity (BOB member since 2017-08-03)

It took some time, but it worked perfectly. Thanks again, BI_SPY!! :smiley:


agerrity (BOB member since 2017-08-03)

Thanks for the utility but I can see only the users and unable to see the usergroups


ash0550 :canada: (BOB member since 2011-09-12)

Can you share the excel file generated for your server? Let me go through it to check the output…


Swapnil_Yavalkar (BOB member since 2012-03-15)

Glad to hear that it worked for you :slight_smile: …There are some changes in the SAP BI4.1 and SAP BI4.2 JAR Files and I had included SAP BI4.1 JAR Files in the main jar that is why it was not working for you.

Yes for 900 users it will take some time but eventually you will get the user details in the excel file… :slight_smile:


Swapnil_Yavalkar (BOB member since 2012-03-15)

Hello,

I cant get this to work. I have saved the following command to a .bat file. A window pops up and then goes away. I have no idea what to do next. Please help.

JAVA.exe –jar UserDetailsSAPBI41-V3.jar Ipaddress Administrator Password


naomidodd (BOB member since 2010-12-28)