Skip to main content

Account Create

Overview

Use these commands to intercept the account-create command.

Input/OutputData Type
InputStdAccountCreateInput
OutputStdAccountCreateOutput

Example StdAccountCreateInput

{
"attributes": {
"id": "john.doe",
"email": "[email protected]",
"department": "external",
"displayName": "John Doe",
"password": "test",
"entitlements": [
"user",
"administrator"
]
}
}

Example StdAccountCreateOutput

{
"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-create command

Use this logic to implement the command:

    .beforeStdAccountCreate(async (context: Context, input: StdAccountCreateInput) => {
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-create command

Use this logic to implement the command:

    .afterStdAccountCreate(async (context: Context, output: StdAccountCreateOutput) => {
logger.info(`Running after account create for account ${output.identity}`)
return output
})

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