When I try to disable an Identities account using the python SDK, the http response comes back as ‘202’ suggesting that it executed successfully and it also gives the task id of the task created to perform the disable. However, when going into IDN, the account is not disabled.
I have checked the identities events, aggregated the account I am trying to disable, processed the identity, done this using postman which works - but still no success
This is the python code I am using to do the disable:
import sailpoint
import sailpoint.v3
from sailpoint.configuration import Configuration
configuration = Configuration()
api_client = sailpoint.v3.ApiClient(configuration)
accounts_api_instance = sailpoint.v3.AccountsApi(api_client)
response = accounts_api_instance.disable_account_with_http_info(account_toggle_request=sailpoint.v3.AccountToggleRequest(externalVerificationId="", forceProvisioning=False),id="2c91808383ea51eb0183eb7dc79027da")
print(response)
And this is the output I get:
status_code=202 headers={'Date': 'Thu, 29 Aug 2024 19:29:25 GMT', 'Content-Type': 'application/json;charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Server': 'nginx', 'Vary': 'Access-Control-Request-Headers', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'SLPT-Request-ID': '55e58e1463544bd7a64d82424b69267e', 'Access-Control-Expose-Headers': 'Retry-After,Connection,SLPT-Request-ID,Content-Length,Date,X-Zuul-ServiceId,Content-Type', 'X-Robots-Tag': 'noindex'} data=AccountsAsyncResult(id='9cca7e87f6d040ad83625a1462955d1c') raw_data=b'{"id":"9cca7e87f6d040ad83625a1462955d1c"}'
PS C:\Users\Chris.Lamprecht\Specsavers\python-template> python .\disableAccount.py
status_code=202 headers={'Date': 'Thu, 29 Aug 2024 19:33:43 GMT', 'Content-Type': 'application/json;charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Server': 'nginx', 'Vary': 'Access-Control-Request-Headers', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'SLPT-Request-ID': '7af8956b5d714500a0625a0284dd8160', 'Access-Control-Expose-Headers': 'Retry-After,Connection,SLPT-Request-ID,Content-Length,Date,X-Zuul-ServiceId,Content-Type', 'X-Robots-Tag': 'noindex'} data=AccountsAsyncResult(id='7997733c0e4a4f0489372f51f273b81a') raw_data=b'{"id":"7997733c0e4a4f0489372f51f273b81a"}'
The code above is for testing, the reason why I want to use the SDK is I have another script that disables multiple accounts for many identities. But I need to get the disabling of the account to work before I continue.