0

I'm trying to generate an OTP (One Time Password) with force 'adminForcedPasswordReset' to true using Curl command is :

 curl -v -k --user admin:admin -X PATCH -d
 '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"replace","value":{"adminForcedPasswordReset":"true"}}]}' --header "Content-Type:application/json"
 https://XXXXXXXX:9443/scim2/Users/5cc8f65f-8be7-4e34-bd2f-67dc409f6770

what i receive in the log :

TID: [-1234] [] [2018-05-28 13:18:39,395]  INFO {org.wso2.carbon.identity.scim2.common.impl.SCIMUserManager} -  User: dev is retrieved through SCIM.
TID: [-1234] [] [2018-05-28 13:18:39,524]  INFO {org.wso2.carbon.identity.scim2.common.impl.SCIMUserManager} -  User: dev updated through SCIM.
TID: [-1234] [] [2018-05-28 13:18:39,600]  INFO {org.wso2.carbon.identity.scim2.common.impl.SCIMUserManager} -  User: dev is retrieved through SCIM.

BUT the OTP is not generated ! also the adminForcedPasswordReset not set to true.

it works well with a soap request referring to this url

Community
  • 1
  • 1
Mirlo24X
  • 37
  • 1
  • 8

1 Answers1

0

Reason for your issue is adminForcedPasswordReset is not a user attribute included in default core user schema.

You can follow instructions in "Extending the SCIM API" section of https://docs.wso2.com/display/ISCONNECTORS/Configuring+SCIM+2.0+Provisioning+Connector to get this work.

Maduranga Siriwardena
  • 1,341
  • 1
  • 13
  • 27
  • yes i configured all needed information and i can run a SOAP UI client as mentionned in the documentation, but using a curl command w'ont to be worked ! – Mirlo24X Jun 11 '18 at 10:26
  • If you get the user through SCIM what is the output? – Maduranga Siriwardena Jun 12 '18 at 04:01
  • Executing curl command returns : {"schemas":"urn:ietf:params:scim:api:messages:2.0:Error","detail":"Error in performing the patch operation on user resource.","status":"500"} Log file on wso2is-km/repository INFO {org.wso2.carbon.identity.scim2.common.impl.SCIMUserManager} - User: dev is retrieved through SCIM. – Mirlo24X Jun 12 '18 at 08:03