Skip to Content
avatar image
Former Member


Hello experts!

I got a problem with an ajax-POST-request. For creating a user in SAP IdM I need a CSRF-Token. But for a create-task with a given TaskID I can't do a GET-request to get the CSRF-Token to use it in my POST-request.

When I do a GET-request for a create-task, the following Error-message occures:

MX_REST_MSG:"Entry '-1' or task '869' not found"


How can I get the CSRF-Token for a POST-request with a given TaskID ?

Best regards!


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 12, 2018 at 01:42 PM

    The CSRF token is not specific to any SAP IDM task, but only to host + context root (aka URL prefix) of the SAP IDM REST API web application. For SAP IDM REST API v2, the context root is /idmrestapi. Hence, any CSRF token you get for a URL starting with /idmrestapi on a host will be valid for any SAP IDM task underneath that context root.

    For example, a CSRF token issued for the following generic URL would work:
    GET /idmrestapi/v2/service

    Add comment
    10|10000 characters needed characters exceeded