If you want all roles to be automatically removed from employees upon termination, you must ensure the autoprovision rule mapping has "HR Assignment Status = Active".
Restricting role provision to "HR Assignment Status = Active" will ensure that only active employees have roles assigned, and thus their user account would be suspended once they have no roles assigned.
1. Login with a system admin account.
2. Go to 'Setup and Maintenance' through the navigator.
3. Search out the task 'Manage HCM Role Provisioning Rules'.
4. In the task page, search out role mappings by name
5. Change the value of the box 'HR Assignment Status' to 'Active'.
6. Save and Close.
7. Go to 'Schedule Process' through the navigator.
8. Search out and run the ESS job 'Autoprovision Roles for All Users' and this should remove all roles from the user and inactivate their user account.
I hope this blog post was helpful for you. If you have any questions or feedback, please leave a comment below.