Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member230921
Active Contributor
This blog describes:-

  • About change password in BI Platform (Enterprise & BW User),

  • Change Password using REST API ,

  • Change Password using "dswsbobje" Service (SOAP WebServices),

  • Change Password using JAVA SDK


 

Change Password in BI Platform:


To get background of the story I am going to talk about :

SAP BusinessObjects Business Intelligence Platform had provided the mechanism to import users from SAP ABAP systems such as BW and re-use the underlying ABAP systems for user authentication. For this, BI platform had a authentication type called as secSAPR3.

The limitation with this user authentication mechanism was that whenever a user password expired or was reset by the BW administrator, the BI Platform did not allow the users to login and change their password. End users received an error message while trying to login to the BI Platform using SAP credentials.

The option to the end users was to use SAP GUI or any other client to do an explicit logon to their SAP systems, change their password, and then come back and use the newly set password to login into BI Platform.

Starting from 4.2 SP05, whenever secSAPR3 authentication mechanism is selected for logon, end users will have the options to change ABAP/BW system password in CMC and BILP (old and new) if their password is expired and they are required to change it at next logon.

Blog: https://blogs.sap.com/2017/11/09/sap-bi-4.2-sp05-changing-sap-bw-password-from-bi-platform/

 

Change Password using REST API:



















Description

URL
HTTP Methods

List all items in Recycle Bin

http://host:<port>/biprws/v1/users/password

GET

POST


Enterprise User:


User must pass logon token in request header "x-sap-logonToken"

Request body in JSON format :
{
"oldpassword":"",
"newpassword":""
}

ABAP User:


"x-sap-logonToken" request header is not required.

Request body in JSON format:
{
"auth":"",
"cms":"",
"username":"",
"oldpassword":"",
"newpassword":""
}

Note: A user must exist in an ABAP system and must have access to the BI platform with the same credentials.

More Info: https://help.sap.com/viewer/DRAFT/db6a17c0d1214fd6971de66ea0122378/4.2.5/en-US/5a0c14986af84cba8cf49...

 

Change Password using "dswsbobje" Services (SOAP WebServices):


Enterprise User:


import com.businessobjects.dsws.session.Session;
....


void changePasswordEnterprieseUser() throws Exception
{
String SESSION_ADDRESS = "http://boeserver:8080/dswsbobje/services/Session";
Session m_session;
SessionStub m_session_Stub;
URL sessConnURL = new URL(SESSION_ADDRESS);
Connection m_sessConnection = new Connection(sessConnURL);
m_session = new Session(m_sessConnection);
EnterpriseCredential credential = EnterpriseCredential.Factory.newInstance();
credential.setAuthType("secEnterprise");
credential.setLogin("administrator");
credential.setPassword("********");
credential.setClientType("test_app");
SessionInfo info = m_session.login(credential);
m_session.changePassword("", "");
}

 

ABAP User:


import com.businessobjects.dsws.session.SessionStub;
....

void changePasswordSAPR3User() throws DSWSException
{
String SESSION_ADDRESS = "http://boeserver:8080/dswsbobje/services/Session";
Session m_session;
SessionStub m_session_Stub;
URL sessConnURL = new URL(SESSION_ADDRESS);

Connection m_sessConnection = new Connection(sessConnURL);
m_session_Stub = new SessionStub(SESSION_ADDRESS);
ChangePasswordDocument cpd = ChangePasswordDocument.Factory.newInstance();
ChangePassword cp = ChangePassword.Factory.newInstance();
cp.setUserName("Bharath");
cp.setAuthType("secSAPR3");
cp.setOldPassword("*********");
cp.setNewPassword("*********");
cp.setSession(null);
cpd.setChangePassword(cp);
m_session_Stub.changePassword(cpd);
}

 

Change Password using JAVA SDK:


Enterprise User:


import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.occa.security.IUserInfo;
....

void changePassword(IEnterpriseSession enSession, String oldPassword , String newPassword) throws SDKException
{
try{
IUserInfo userinfo = enSession.getUserInfo();
userinfo.setPassword(oldPassword, newPassword);
}catch(SDKException e){
throw e;
}
}

import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
import com.crystaldecisions.sdk.plugin.desktop.user.IUser;
....


void changePassword(IEnterpriseSession enSession, String oldPassword , String newPassword) throws SDKException
{
int user_id = 1234;
String userQuery = "SELECT SI_ID,SI_CUID from CI_INFOOBJECTS,CI_APPOBJECTS,CI_SYSTEMOBJECTS WHERE SI_ID = '"+user_id+"'";
IInfoObjects users = null;
try{
IInfoStore inostore = (IInfoStore) enSession.getService("Inostore");
users = inostore.query(userQuery);
IUser user = (IUser)users.get(0);
user.changePassword(oldPassword, newPassword);
user.save();
}catch(SDKException e){
throw e;
}
}

More info: https://help.sap.com/http.svc/rc/7adfc93c56564bb0bade737ea8a3a61f/4.2.4/en-US/index.html?com/crystal...

ABAP User:


import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.ISessionMgr;
.....


void changePassword(String username, String auth, String cms,String oldPassword , String newPassword) throws SDKException{
try {
ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
sessionMgr.changePassword(username, auth, cms, oldPassword, newPassword);

}
catch(SDKException e){
throw e;
}
}

More Info: https://help.sap.com/http.svc/rc/7adfc93c56564bb0bade737ea8a3a61f/4.2.4/en-US/index.html?com/crystal...

 

Learn More:


https://help.sap.com/viewer/0225aa3e7b4b4b17b2d4a882e6f2de96/4.2.5/en-US/45a6bf8f6e041014910aba7db0e...

https://blogs.sap.com/2017/12/15/bi-platform-rest-sdk-rws-in-boe-4.2/

https://blogs.sap.com/2017/05/10/query-the-businessobjects-repository-using-bi-platform-rest-sdk-rws...

https://blogs.sap.com/2017/04/21/session-management-in-bi-platform-rest-sdk-rws/

https://help.sap.com/viewer/product/SAP_BUSINESSOBJECTS_BUSINESS_INTELLIGENCE_PLATFORM/
1 Comment