Skip to Content

How do I create a User in SAPUI5 for the SAP IdM?

I am trying to create a User by an ajax call for the SAP IdM.

This following is my coding to create a user:

var myData = {

"SV_MX_SALUTATION": "Mr",

"SV_MX_FIRSTNAME": "Myfirstname",

"SV_MX_LASTNAME": "Mylastname",

"SV_MX_MAIL_PRIMARY": "email@example.com"

};

$.ajax({

type: "POST",

url: "http://host:port/idmrest/v72alpha/entries/",

username: "user",

password: "password",

beforeSend: function(req) {

req.setRequestHeader('Authorization', 'Basic ' + btoa('user:password')); },

dataType: "json",

headers: {

"X-CSRF-Token": "xsrfTokenValue",

"X-Requested-With": "JSONHttpRequest",

"Accept": "application/json",

"Content-type": "application/x-www-form-urlencoded"

},

data: myData,

async: false,

contentType: 'application / json',

success: function(data) {

console.log("success");

}

});

The response that I get ist the following:

Can anyone help me to solve this problem ?

best regards

Receb Yildiz

rest-response.png (31.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers