Yes, you can handle this entirely in an ISC workflow.
For Trigger:
Use the Identity Lifecycle State Changed event and branch on lifecycleState == “TERMINATED” or something based on the requirement.
Get Access
Action: Get Access
Access Selection Method: By Identity → {{trigger.identityId}}
Types: Roles (and/or Access Profiles, Entitlements—filter) something like $.getAccess.accessItems` is an array of objects `{ id, name, type }`
Extract Only Roles
Use a Transform (JSONPath) or Filter operator to select only items where type == "ROLE":
$.getAccess.accessItems[?(@.type=="ROLE")]
Save that to, say, {{rolesToRemove}}.
Manage Access
Action: Manage Access
Request Type: Remove Access
Identities: {{trigger.identityId}}
Access to Manage: {{rolesToRemove}}
Comment: “Remove all non-criteria role assignments on termination”
This submits a single request to strip the user from every role in rolesToRemove.
—Iterate a loop over identities assigned to the role—
The get access just returns the roles the user has, it does not return the role information with the identities assigned
You cannot remove the identities from the automated roles i.e roles with membership criteria. They will get revoked only based on criteria. So, you can add additional criteria in the automated role to define the identity status like LCS = active, this will revoke the role when identity moving to inactive.
For the non membership criteria roles or requestable role, you can use Certification campaign to revoke the access when they move to inactive. This is pretty much possible using Workflow Workflow to remove ALL leavers' standing access
Have you considered adding a wait time to the workflow, so that the role membership criteria would take care of the BR roles removal and the WF will have only the non-membership roles for revocation.
it would work if all the criteria roles had say LCS = Active as part of the required criteria for membership but that is not always the case and this means it may fail depending on the users role membership.