cancel
Showing results for 
Search instead for 
Did you mean: 

HANA XS With IAS SCIM API

former_member460045
Participant
0 Kudos
Dear all, 

I have a problem with using the IAS scim API from HANA XS. I tested this api call with Postman (working fine).

But now, for HANA XS i only always get an empty response body

host = "<account>-qa.accounts.ondemand.com";
port = 443;
pathPrefix = "/service/scim/";
proxyType = none;
authType = basic;
useSSL = true;
sslHostCheck = false;
sslAuth = client;

I have imported the certificate of the IAS into the trust store and selected the trust store in XS - Admin console.

This is what I try to do in the xsjs

 
try {
    let oDest = $.net.http.readDestination("cmCloudManager.v1.logic.ias.scim", "scim");
    var oClient = new $.net.http.Client();
	var oReq = new $.net.http.Request($.net.http.GET, "/Users");
	    oReq.headers.set("Content-Type", "application/scim+json");
	    oReq.headers.set("Authorization", "Basic xxxh6clFDa0NDWA==");


    oClient.request(oReq, oDest);
    var oResponse = oClient.getResponse();
    
    if(oResponse.body){
        return oResponse.body.asString();
    }else{
        $.trace.error(JSON.stringify(oResponse)); <-- this where I always end up
        return "no body";
    }
}catch(e) {
    $.trace.error(e);
    return e;
} 

I always get a empty result. Not even anything back from the IAS. When I try to log the result with $.trace.error() I simply get {}

Maybe anybody has a hint?

Thanks!

Johannes

lucasvaccaro
Product and Topic Expert
Product and Topic Expert
0 Kudos

What's the HTTP code you get?

former_member460045
Participant
0 Kudos

401 is the status I get.

Accepted Solutions (1)

Accepted Solutions (1)

former_member460045
Participant
0 Kudos

I solved this. Main point was:

Including the the top level certificate of the IAS in the Trust Store.

Best regards

Johannes

Answers (0)