Why are user account deletions request stuck in pending state
Question
Why are user account deletions request stuck in pending state though I approved it in CSR admin?
Answer
If the account was initiated by user and not from the CSR admin page, then it requires user approval to reach the final state.
Following are more details on user initiated account deletion.
The user can request their account deletion, however if the tenant has subscriptions enabled then all subscriptions should be terminated first. The account deletion involves two steps:
Request delete account. This will create an ANONYMIZE_USER_DELETION_REQUESTED event, and mark the account for deletion, placing it in a status of waiting for approval to be deleted. The event will contain a nonce, which must be used for the user to approve or decline the account deletion. The nonce should be shared with the user through an email service provider.
Approve or reject the account deletion. The user must use the nonce to approve or decline the account deletion.
If the user declines the account deletion, a reason ('MISTAKE', 'CHANGED_MIND', 'OTHER', or 'DID_NOT_REQUEST_DELETION') should be sent as part of the request, and an ACCOUNT_DELETION_REQUEST_DECISION event will be created.
If the user approves the deletion, an ACCOUNT_DELETION_REQUEST_COMPLETED event is created once it's successful, the user's Profile, Identity, User, Address, Payment, and Subscription records will be deleted for Arc XP.