Discussions
Disable user account using Validates a User endpoint
almost 2 years ago by Charitha
We have iMIS Enterprise 20.3.136.136.
I'm trying to learn how to disable a specific user account using Validates a User endpoint.
https://developer.imis.com/reference/validateuser
Under body parameter section it says you can get or set IsDisable
IsDisable - boolean
Gets or sets the disabled indicator.
I have tried this using POST request as bellow.
'application/json', 'content-type' => 'application/json', 'Authorization' => 'Bearer DqmVwgo' ]; $body = '{ "$type": "Asi.Soa.Membership.DataContracts.UserData, Asi.Contracts", "IsAnonymous": false, "IsDisable": true, "Party": { "$type": "Asi.Soa.Membership.DataContracts.PartySummaryData, Asi.Contracts", "IsMarkedForDelete": false, "IsOrganization": false, "Status": { "$type": "Asi.Soa.Membership.DataContracts.PartyStatusData, Asi.Contracts", "ActiveStatus": "Active" } }, "EffectiveDate": "01/01/2023", "ExpirationDate": "01/01/2025", "UserId": "84008", "UserName": "[email protected]" }'; $request = new Request('POST', 'https://www.nsw.ipaa.org.au/api/User/_validate', $headers, $body); $res = $client->sendAsync($request)->wait(); echo $res->getBody(); But, im getting "An error occurred. Please contact the administrator." error. How can i fix this. Am looking using the correct reference guide as per my IMIS version. (iMIS Enterprise 20.3.136.136) Thanks !