Hi,
If you want to remove the contributor role for an external user in a particular RG, open Access control (IAM) at that scope, for example, Resource group, select Role assignments (Preview), check the user,
and click Delete.
Then choose Yes.
After the role assignment is removed you will get the message below.
If you get an error message like the one below, it means that the same role was inherited from another scope, such as Azure Subscription, and you have to remove it from there.