Hi,
I am not an expert but one way you can achieve this is by creating a custom mapper which you add to you idp.
The mapper has a method called preprocessFederatedIdentity() where you have access to the idp id (or email)
preprocessFederatedIdentity()
* Called to determine what keycloak username and email to use to process the login request from the external IDP.
* It's called before "FirstBrokerLogin" flow, so can be used to map attributes to BrokeredIdentityContext (
* BrokeredIdentityContext.setUserAttribute ),
* which will be available on "Review Profile" page and in authenticators during FirstBrokerLogin flow
You can use that to find your user and delete it. For that there is a method in the KeycloakSession object session.users().removeUser().
I am curious what is the use case to delete the user every time it will log in. It is quite counterintuitive.
I hope it helps,
Alvaro