Account Delete
Input/Output | Data Type |
---|---|
Input | StdAccountDeleteInput |
Output | StdAccountDeleteOutput |
Example StdAccountDeleteInput
{
"identity": "john.doe",
"key": {
"simple": {
"id": "john.doe"
}
}
}
Example StdAccountDeleteOutput
{
}
Description
The account delete command sends one attribute from ISC, the identity to delete. This can be passed to your connector to delete the account from the source system.
Enable account delete in ISC through a BeforeProvisioning rule. The connector honors whichever operation the provisioning plan sends. For more information, see the documentation and an example implementation.
To use this command, you must specify this value in the commands
array: std:account:delete
The following snippet shows an example of account delete command implementation:
.stdAccountDelete(async (context: Context, input: StdAccountDeleteInput, res: Response<StdAccountDeleteOutput>) => {
const account = await airtable.getAccount(input.key)
res.send(await airtable.deleteAccount(account.airtableId))
})
async deleteAccount(airTableid: string): Promise<Record<string, never>> {
return this.airTableBase('Users').destroy(airTableid,
).then(() => {
return {}
}).catch(err => {
throw new ConnectorError('error while deleting account: ' + err)
})
}