cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API V2 - Create new entry in MX_PERSON

Former Member
0 Kudos

Hi everyone,

I'm very new to working with the Rest API for IdM and I've been trying to find an answer for the following question, but unfortunately didn't find it yet. If I just missed this somewhere, please apologize (and maybe give me a hint where I can find it)

As a developer, I'm requested to write a custom UI for SAP IdM using the Rest API V2 and I should be able to create new entries in MX_PERSON (new employees). A corresponding task is available (as UI Task), which creates a new entry (pending for approval). I only know the task guid and the required attributes.

However, I was not able to figure out, how I access this task using the Rest API, i.e., how to write the corresponding POST request (reading & editing entries works fine). I assume I must be able to access the task by .../idmrestapi/v2/service/ET_MX_PERSON(ID=...,TASK_GUID=<guid of the task which creates a new user>) somehow, but I don't have an ID of the new entry (as it is created after successfully accessing the task), so I tried posting to it without the ID which does not work.

Did I missunderstood something? Or how can I access the task, which should take some (mandatory) attributes such as name,... and then create a new user (=create a new entry in MX_PERSON)?

Thanks in advance,

Dominique

Accepted Solutions (1)

Accepted Solutions (1)

normann
Advisor
Advisor
0 Kudos

Hello Dominique,

In the old version (up to SP7) you just called (POST) the create task for entry 0. Nice examples in documentation https://scn.sap.com/docs/DOC-26747.

With the new version (SP8) it is not supported to create an entry yet - at least it is not documented and I would not know how to either -> CSN Message.

Regards

Norman

Former Member
0 Kudos

Hi Norman,

Thanks a lot for your answer.

(Unfortunately) we're having SP8 installed...

Kind regards,

Dominique

normann
Advisor
Advisor
0 Kudos

Hi again,

a possible workaround would be using both REST APIs in parallel. You can call the old one just to create an entries.

Regards

Norman

Former Member
0 Kudos

Hi Norman,

Thanks for your answer! This is definitely worth a try I think this could really "solve" my problem (at least it is a good workaround).

Thank you so much!

Dominique

Answers (3)

Answers (3)

0 Kudos

Hi All,

I am also very new to this topic.  So please excuse me for if my questions are very silly.

1. Is this possible to create new user using v1 ?  If yes any document/link please

2. If we cannot use REST API, then how do we create/change new users ?

Regards,

Ziya

normann
Advisor
Advisor
0 Kudos

Hi Ziya,

You can create new users using REST V1 and it is described in official documentation SAP NetWeaver Identity Management Identity Cent... | SCN.

Regards

Norman

0 Kudos

Hi Norman,

Thanks for your reply. I tried resetting a password (thinking it is easier than creating a new one) from this document as this link,

http://.../idmrest/v72alpha/entries/25/tasks/pwdreset

I got the output as

{"MX_REST_SUCCESS":false,"ENTRIES":{},"MX_REST_MSG":"Entry\x20\x2725\x27\x20or\x20task\x20\x27\x2d2\x27\x20not\x20found"}

We are not sure here what is this output.  Might be I have do something with the "tasks"

I don't know how to create/edit tasks. You can please guide us how/where to create/edit tasks also.

Thanks in Advance,

Ziya

PS: We are just starting using this IDM - so sorry for asking basic questions.

normann
Advisor
Advisor
0 Kudos

Hi Ziya,

you have to do a HTTP Post in order to be able to change or create entries. Entering the URL in the browser will just do an HTTP Get which does not change any data.

If you want to reset your password in the Browser you either use the default IdM UI (/idm) or you create your own UI that is performing the necessary HTTP Post operations.

Please use a rest client (like the one from the most popular search engine provider) to play around and learn how to use the interface.

Thanks

Norman

ChrisPS
Contributor
0 Kudos

Hi Ziya,
           there should be some old threads and the REST is documented already as Norman has pointed out already so its best to search first before posting.

Thanks,

Chris

IdM Moderator

keith_zhang
Active Participant
0 Kudos

Hello Dominique,

I just tried to test this, while following "limitation" part mentioned/explained this for REST v2:

http://help.sap.com/saphelp_nwidmic_72/helpdata/en/9a/45ce530ff84729afdbc40e8d5a1ed3/content.htm?fra...

(The last point)

BR, Keith

Former Member
0 Kudos

Hi Keith,

Thanks for pointing this out - seems that it is really not possible in v2...

Kind regards,

Dominique

Former Member
0 Kudos

Hello Dominique,

As suggested by Norman, use the How to guide on this here. you can refer to section 2.5 Process Entry Data Change (or Creation) for the query in your post.

Also, as you have mentioned you are using API V2, I would also recommend you to go through this

All the best.

Thanks,

Krishna.

Former Member
0 Kudos

Hi Krishna,

Thanks for the references to the documents!

Kind regards

Dominique