Skip to Content

Scripting IdM the Open Source Way [incl. VIDEO]

Dear IdM experts,

in this video (duration: 00:09:24), I demonstrate JavaScript development for SAP NetWeaver(R) Identity Management using a customized version of the popular open source editor GNU Emacs.

Working on a simple, yet realistic scripting use case, I show some nice features in action:

  • Code completion anywhere for IdM built-in functions, view/table names, Identity Center attribute names and more
  • Basic JavaScript syntax checks as you type and on request
  • Automatic indentation as you type and on request re-indentation of your complete script
  • Eclipse-like splitting up of strings into multi-line, concatenated strings by pressing Enter inside any string
  • Minimal start-up time using Emacs client/server architecture

In the hope that these customizations might be interesting or even useful to others as well, I published them as open source under the terms of the GNU General Public License (GPL v3). The complete source code of all customizations and Emacs extensions required to get started with scripting like in the video is available at GitHub in the IDMacs repository.

If you want to try it out, just follow the installation instructions in the project’s README file. It’s reasonably easy to set up.

Happier scripting!


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

    This is an amazing tool! My only comment is that you need to include the new key bindings in the help file.

    As I saw from your video tutorial There were 4 bindings:

    CTRL-Enter - Auto complete

    CTRL-F2 - Syntax Check

    CTRL-F3 - Save

    Shift-F1 - Auto Format

    It's also somewhat disconcerting that in the emacs windows the file appears with a .vbs extension.  Can this be changed?

    Again, congrats on a fantastic tool!  This is going into every DEV environment I work in!


    • Thanks Matt!

      Your list of keybindings is correct. In addition, the following IDMacs-specific keybindings exist which I didn't show in the video:

      • Ctrl - F4: Quit (without saving first)
      • Ctrl - /: Toggle line comment

      I've just pushed an update to the README in GitHub to document them properly, and also how to file bug reports.

      Regarding the .vbs extension: I agree it's confusing. As you probably know, that's the file name exported by MMC to any external script editor, no matter whether it's JavaScript or Visual Basic Script. I will look into if and how this could be improved.

      Best regards,


    • The .vbs extension is now suppressed in JavaScript mode by the latest version in GitHub.

      commit 7c3b4c432d74eaa46398e00defec9dc9e1bba8b7
      Author: Lambert Boskamp Date:   Fri May 3 09:18:05 2013 +0200
          default.el: Suppress file extension in frame title

      Cheers, Lambert

  • Can't get auto-complete to work? That's because my documentation of that key binding was wrong! It's not (and never was) bound to Ctrl-Enter. The correct key binding is:

    Ctrl-Space: Auto-complete

    I've updated the video link in the main post accordingly, so now the audio and subtitle for this one are correct as well.

    BR, Lambert

    • Thanks for that update!  I thought it was a problem with my keyboard/computer.

      Any chance you can work in a link to the help file or website for function lookups?


      • No problem:

        Shift+F2: Display API Documentation

        is now available in the latest IDMacs version on GitHub. Here's another video tutorial (duration: 00:04:55) showing how this can be used and customized to either display help from the web or from a local help file.

        Hope that helps,