Skip to main content

Account Update

Overview

Use these commands to intercept the account-update command.

Input/OutputData Type
InputStdAccountUpdateInput
OutputStdAccountUpdateOutput

Example StdAccountUpdateInput

{
"identity": "john.doe",
"key": {
"simple": {
"id": "john.doe"
}
},
"changes": [
{
"op": <Set|Add|Remove>,
"attribute": <account attribute to modify>,
"value": <the value to use for the operation>
}
]
}

Example StdAccountUpdateOutput

{
"identity": "john.doe",
"key": {
"simple": {
"id": "john.doe"
}
},
"disabled": false,
"locked": false,
"attributes": {
"id": "john.doe",
"displayName": "John Doe",
"email": "[email protected]",
"entitlements": [
"administrator",
"sailpoint"
]
}
}

Implementation

Before account-update command

Use this logic to implement the command:

    .beforeStdAccountUpdate(async (context: Context, input: StdAccountUpdateInput) => {
logger.info(`Running before account, for account ${input.identity}`)
return input
})

The input object can be mutated and returned, but the same data type must still be returned.

After account-update command

Use this logic to implement the command:

    .afterStdAccountUpdate(async (context: Context, output: StdAccountUpdateOutput) => {
logger.info(`Running after account update for account ${output.identity}}`)
return output
})

The output object can be mutated and returned, but the same data type must still be returned.