<div dir="ltr">Hi all,<div>we are running midPoint 3.4 and our customer has an existing web portal where they want to maintain all end-user interaction.</div><div>They are building a component to allow end-users to change their passwords. We would like them to use the REST API. From the portal, they will have the username from the session and present a form to ask the user's old_password and new_password.</div><div><br></div><div>Our idea so far:</div><div>1) Grant our end-users a custom role with <a href="http://midpoint.evolveum.com/xml/ns/public/security/authorization-rest-3#all">http://midpoint.evolveum.com/xml/ns/public/security/authorization-rest-3#all</a> authorization, in addition to the minimum requirements to change his own credentials and it's shadow's credentials.<br></div><div>2) use <a href="http://xxxxx/midpoint/ws/rest/users/search">http://xxxxx/midpoint/ws/rest/users/search</a>, to find the user by name and parsing the XML result to get his oid.</div><div>3) use <a href="http://xxxxxx/midpoint/ws/rest/users/{user_oid}">http://xxxxxx/midpoint/ws/rest/users/{user_oid}</a> to POST an objectModification to set credentials/password</div><div>(both REST calls would use username:old_password for authorization)</div><div><br></div><div>Is this the correct approach? Is there any better/easier way to achieve this?</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>GJG</div></div>