Actually I have created a custom plugin to delete the user account. Delete User REST API requried Site-Manage Membership permission but I dont want to give Site-Manage Membership permission for all the site users.
So before delete user REST API I am impersonating user to the admin user and executes DELETE USer REST API. After deleting user I want to change stop the impersonating user.
Can we override the CSContext object back to its previous value?