How to Automatically Authenticate - NT, LDAP and AD
This document is created from two SAP / BO documents
How do I automate the Windows Active Directory security information update using a Java or VBScript?
Cause
In Business Objects Enterprise XI Release 2, there is a need to automatically refresh the security information of Windows Active Directory (AD) users instead of manually clicking Update in the Authentication section of the Central Management Console (CMC).
Resolution
Use one of the following scripts to update the plug-in information in the Central Management Server.
It is possible to schedule these programs as program objects using Business Objects Enterprise. For details on how create a program object in the CMC, please refer to SAP Note 1205934 for VBScript and SAP Note 1199532 for Java.
VBScript
Copy and paste the code below in a file named Update_WinAD_plugin.vbs in order to have Visual Basic Script that will be able to be run in your server.
Dim oSessionManager
Dim oEnterpriseSession
Dim oSess
'For the logon, Authenticate as Following
Const CMS = "servername"
Const UserID="Administrator"
Const Password = ""
Const Aut = "SecEnterprise"
'Create an Enterprise oSessionManager
Set oSessionManager = CreateObject("CrystalEnterprise.SessionMgr")
Set oSess = oSessionManager.Logon(UserID, Password, CMS, Aut)
'Query the InfoStore and Set The Update Time to refresh now
On Error Resume Next
Set iStore = oSess.Service("", "InfoStore")
Set secWinADplugins = iStore.Query("SELECT TOP 1* FROM CI_SYSTEMOBJECTS WHERE SI_NAME='secWinAD'")
Set secWinADplugin = secWinADplugins.Item(1)
secWinADplugin.Properties.Item("SI_UPDATE_TS").Value = now
iStore.Commit secWinADplugins
oSessionManager.logoff
-------------------------------------------------------
There are three steps to publishing a VBScript program object in the CMC: adding the program object, enabling it and setting the user credentials for it.
Add a program object to enterprise
Set credentials on the individual program object
- 1205934 - How to create a VBScript program object in the CMC
- 1207560 - How to automate the update of the Windows Active Directory plug-in information using a Java or VBScript
How do I automate the Windows Active Directory security information update using a Java or VBScript?
Cause
In Business Objects Enterprise XI Release 2, there is a need to automatically refresh the security information of Windows Active Directory (AD) users instead of manually clicking Update in the Authentication section of the Central Management Console (CMC).
Resolution
Use one of the following scripts to update the plug-in information in the Central Management Server.
It is possible to schedule these programs as program objects using Business Objects Enterprise. For details on how create a program object in the CMC, please refer to SAP Note 1205934 for VBScript and SAP Note 1199532 for Java.
VBScript
Copy and paste the code below in a file named Update_WinAD_plugin.vbs in order to have Visual Basic Script that will be able to be run in your server.
Dim oSessionManager
Dim oEnterpriseSession
Dim oSess
'For the logon, Authenticate as Following
Const CMS = "servername"
Const UserID="Administrator"
Const Password = ""
Const Aut = "SecEnterprise"
'Create an Enterprise oSessionManager
Set oSessionManager = CreateObject("CrystalEnterprise.SessionMgr")
Set oSess = oSessionManager.Logon(UserID, Password, CMS, Aut)
'Query the InfoStore and Set The Update Time to refresh now
On Error Resume Next
Set iStore = oSess.Service("", "InfoStore")
Set secWinADplugins = iStore.Query("SELECT TOP 1* FROM CI_SYSTEMOBJECTS WHERE SI_NAME='secWinAD'")
Set secWinADplugin = secWinADplugins.Item(1)
secWinADplugin.Properties.Item("SI_UPDATE_TS").Value = now
iStore.Commit secWinADplugins
oSessionManager.logoff
-------------------------------------------------------
There are three steps to publishing a VBScript program object in the CMC: adding the program object, enabling it and setting the user credentials for it.
Add a program object to enterprise
- In the CMC, go to Home | Objects.
- Click New Object button.
- Select Program in the left hand list.
- Browse to find the VBScript file.
- Select the Script option button
- Select a folder to save it to enterprise.
- Click Submit.
- In the CMC, go to Home | Objects.
- Click Object Settings.
- Select the Program Objects tab.
- Make sure the "Run scripts/binaries" check box is ticked.
- Click Update.
Set credentials on the individual program object
- In the CMC, go to Home | Objects and locate and click on the program object to get to the properties page.
- Select the Process tab.
- Select the Logon tab.
- Enter the credentials.
- In the CMC, go to Home | Objects.
- Click on the Objects settings button to get to the properties page.
- Select the Program Objects tab.
- Enter the credentials in the "Schedule with the following OS credentials" section.