Failed to disable accounts by manage accounts using workflows

Hi All,

I need to build a workflow to manage inactive users who still have active AD accounts. This effort is necessary because we haven’t yet automated the process of disabling AD accounts for inactive users.

I’ve managed to trigger and fetch the identities successfully. However, I’m encountering issues with disabling the AD accounts whose names start with “ad.” Can anyone assist me with this?

I’ve attached a screenshot for your reference.

Thank you!


It shows me this particular error
{
“accountsErrorDetails”: [
{
“accountID”: “”,
“errorMessage”: “unable to decode response body: json: cannot unmarshal array into Go value of type infra.accountDto (type: HTTP Response Returned a Client Error, retryable: false): unable to decode response body: json: cannot unmarshal array into Go value of type infra.accountDto”
}
],
“failedAccounts”: [
“”
],
“successfulAccounts”: null
}

Hi @Soundary ,

I would suggest using loop, as Get List of Identities will give us list of identities where the manage account step will not know to which identity it needs to disable the account.

Get List of Identities–>loop–>Get accounts (here you can get all the accounts for an identity at a time) -->Manage Accounts ($.getAccounts.accounts[?(@.name =~ /^ad/)].id)

Other easy way is to add the AD source in “Inactive” LCS in Identity Profile to disable the account

Hi Theja,
Thank you for the response. Currently there is only one identity which matches the search criteria. so, may be adding a loop operator is not the problem here? Or I am wrong?

But it will fail in future if there are more identities. Also, use “Get accounts” action to get all the accounts of an Identity before “Manage accounts”

1 Like