Skip to Content

SAP IDM – How to call web service from IDM

Despite my answers on questions like “How to call web service from IDM”, there was a demand for detailed explanation, so here it is.

There is a simple way to call web service from IDM. All we need is JavaScript function and Java based web service. I’ve prepared myself a simple example just as an example.

So let’s get started.

This is my Java based web service:

CCH_REQUEST_CHILD0001.PNG

Deploy you web servise. What is important is that the JAR file should be copied to server where the IDM console is and added in console class path extension, like this:

Capture4.PNG

Then of course the dispatchers scripts should be regenerated and reinstalled. Of course if all web services will use only one dispatcher then you should regenerate and reinstall only it.

Now the IDM part follows.

I’ve used job in job folder with To Generic pass:

Capture3.PNG

In scripts add the following script:

Capture2.PNG

Capture5.PNG

Set the destination tab as follows:

Capture1.PNG

And you are ready to go. Just run the job and here it is the result:

Capture.PNG

Of course you can use JavaScript code from other passes including provisioning ones, but it should be reworked a little bit in parameters part and should look like this:

CCH_REQUEST_ROLE0001.PNG

If you wonder why I’m using new String(Par) instead of Par directly. It is better this way, because from my personal experience sometimes Par is not recognized as string and then when you try to parse it this way instead of array{String1,String2} you will receive array{ S,t,r,i,n,g,1,S,t,r,i,n,g,2}.
So in order to avoid this behavior always create a new string of Par and then parse it.

I conclusion, if you feel that something is not clear enough or you have unanswered questions, or recommendations please feel free to post
them here or contact me.

Best Regards,

Ivan

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Kai Ullrich

    Hi Ivan,

    regarding your statement

    If you wonder why I’m using new String(Par) instead of Par directly. It is better this way, because from my personal experience sometimes Par is not recognized as string and then when you try to parse it this way instead ofarray{String1,String2} you will receive array{ S,t,r,i,n,g,1,S,t,r,i,n,g,2}.

    So in order to avoid this behavior always create a new string of Par and then parse it.

    The reason why this is so is explained in my blog post About length and length().

    Thx

    kai

    (0) 
  2. Daniel Cohen

    Ivan,

    I have a .net webservice for Active Directory that I’m trying to call from javascript.  The webservice is SSL encrypted.  Do you know of any examples of calling a https webservice from IdM?  I keep getting an SSL handshake exception.

    (0) 

Leave a Reply