cancel
Showing results for 
Search instead for 
Did you mean: 

Ajax GET request issue (SAP Cloud Platform Identity Authentication User Search)

08-27-2020 8:09 AM
977 views 1 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi Experts,

I would like to retrieve user information from IAS. So, I used this REST api

"https://<tenant ID>.accounts.ondemand.com/service/scim/Users/" according to sap documentation.

・https://help.sap.com/viewer/6d6d63354d1242d185ab4830fc04feb1/Cloud/en-US/3af7dfae0aad4cf79ab8d822f8322e76.html

But, I faced 401 unauthorized error when I run the application although the user can access to the tenant

"https://<tenant ID>.accounts.ondemand.com" and it is admin user.

What others actions or somethings did I missed? Please kindly provide.

Here is the steps I did.

1). At first, I created the destination.

{

"path": "/IAS_connect_scim",

"target": {

"type": "destination",

"name": "IAS_connect_scim"

},

"description": "IAS_connect"

}

2). I wrote this codes at controller.js at my web ide (neo).

$.ajax({

type: "GET",

contentType: "application/scim+json",

url: "/IAS_connect_scim/service/scim/Users",

xhrFields: { withCredentials: true },

beforeSend: function (req) {

req.setRequestHeader('Authorization', 'Basic ' + btoa(userid + ":" + pwd)); },

headers: { "Authorization": "Basic " + btoa(userid+ ":" + pwd) },

username: userid,

password: pwd,

dataType: "json",

async: false,

success: function (data, textStatus, jqXHR) { window.alert("success"); },

error: function (data, xhr, textStatus) { window.alert("error"); } });

Best Regards,

Thiri

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

former_member494689
Participant
0 Likes

Hi

The issue can be solved now.

It needs to add the system as administrator when using SCIM.

Please refer the link https://help.sap.com/viewer/6d6d63354d1242d185ab4830fc04feb1/Cloud/en-US/bbbdbdd3899942ce874f3aae9ba...

Best Regards,

Thiri

Answers (0)