D George
D George

Reputation: 188

OIM 12c Rest api to enable/disable user

I am developing a web service to create and update users in OIM. The OIM 12c Rest api's are being used for this purpose. I am able to update the fields like first name, last name using the Update User api - /iam/governance/selfservice/api/v1/users/{uuid}.

I have to add the enable/disable user functionality in my service. I am not able to achieve this using the above rest service. Is there any other Rest api in OIM to set the usr_disabled flag?

Setup: OIM url - http://:/iam/governance/selfservice/api/v1/users/1011

JSON Request: { "requestId": "1234", "fields": [ { "name": "usr_disabled", "value": "1" }, { "name": "First Name", "value": "Peter" }, { "name": "Last Name", "value": "Pan" } ] }

JSON response from OIM:

{ "title": "IAM-2050033 : ModifyUserDataset request cannot set or change attribute usr_disabled, since it is not defined in the corresponding data set.", "status": 500, "detail": "IAM-2050033 : ModifyUserDataset request cannot set or change attribute usr_disabled, since it is not defined in the corresponding data set.", "instance": "oracle.iam.request.exception.RequestServiceException", "errorCode": "IAM-2050033", "referer": "http://cloud.kapstonellc.com:14011/iam/governance/selfservice/api/v1/users/1011" }

Upvotes: 1

Views: 1384

Answers (1)

Chaitanya K
Chaitanya K

Reputation: 1847

This is a bug in OIM and you need to use the workaround as of now. The workaround is as follows:

To Disable User:

  1. Set the user's End Date value
  2. Set System property XL.UserDeleteDelayPeriod to 3600 (10 years)
  3. Run Schedule Job Disable/Delete User After End Date

To Enable User:

  1. Set Start Date to some past date
  2. Run Scheduled Job Enable user After Start Date

Upvotes: 1

Related Questions