Skip to Content
avatar image
Former Member

SAP IDM REST API V72ALPHA - ContextID doesn't work

Hello Experts,

I'm using IDM REST API v72alpha to grant business role to user. It works like a charm except if I want to set a context to the role.

According this link I have to set the value CONTEXTID=MSKEYOFTHECONTEXT, but It doesn't work.

Below my code

var parameters = {
				"MXREF_MX_ROLE" : {
					"VALUE" : "46054",
					"CONTEXTID" : "129785",
					"REASON" : "New assignment request with context only",
				}
			};


			var url = ProxyUtil.proxyfiAddress(JsonUrlCfg.v72Home() + this._mskey + "/tasks/" + taskIdManageUserAssignments);


			// Close the dialog
			if (this._oDialog != null) {
				this._oDialog.close();
			} else {
				this._oDialog = sap.ui.xmlfragment("com.idm.ui5.fragments.ReviewAssignment", this);
				this._oDialog.close();
			}


			// Post data
			var oModel = new sap.ui.model.json.JSONModel();
			oModel.loadData(url, parameters, true, "POST", false, false, headers);


			// Show information
			MessageToast.show(JsonUrlCfg.getResourceText("businessRoleAssignmentComplete", [ this._selectedRoleDisplayName ]));

And the POST return me this error

Do you have any idea what I'm doing wrong?

Thanks for your help!

sans-titre.png (11.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 20, 2017 at 11:10 AM

    Hey Nicolas,

    had the same issue. Please try this notation:

    {
    "REFERENCED_ID":46054,
    "CONTEXT":{
    "CONTEXT_ID":129785
    },
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 09, 2017 at 06:31 AM

    I will try thanks a lot Hendrik

    Add comment
    10|10000 characters needed characters exceeded