cancel
Showing results for 
Search instead for 
Did you mean: 

Expose password reset in su01 as RESTful service ?

0 Kudos

Dear community,

I'm a software developer and our company is trying to automate the SAP password reset process, right now the user needs to make a call to a technician that logs into SAP and in su01 reset the password, then copy the generated password and send it by email.

We're looking forward to automate this process, and searching by ways to do it i found this blog post that shows that's possible to expose a function module as RESTful service.

I would like to know if it's possible to create a RESTful service that triggers the users password reset and returns it as JSON, or other format. If so, can u give me a guide or a direction on how to do it ?

With gratitude,
Gabriel Castello

stanislaslemaire
Participant

Where is your problem ? To expose functions to manage user password reset as RESTful or to create function in SAP to manage user ?
For first thing, I cannot help you, for second, it's not very hard. You have just to create 2 'Z' BAPI as RFC function module to manage user by use of standard function module as GENERATE_SEC_RANDOM, BAPI_USER_UNLOCK, RSEC_GENERATE_PASSWORD, SUSR_USER_PASSWORD_PUT etc

Sandra_Rossi
Active Contributor

Do you have SAP PO/PI? If not, is SOAP possible for you?

BAPI to reset the password = BAPI_USER_CHANGE with parameters passwordx = 'X' and generate_pwd = 'X', and returned password is in parameter generated_password.

View Entire Topic
dairolozano
Contributor
0 Kudos

Hi.

You can implement a new service, use the function module SUSR_USER_CHANGE_PASSWORD_RFC to reset the password and send the new password in the service response.