Is it possible to use "sub" in the userInfo for the login field instead of email value during OAuth

I am trying to use Openid connect and integrate with Grafana. That works fine but I get the email and login field populated by the email id. So email id is playing a crucial role in the authentication.
Is it possible to use sub for the login field as received in the user info {“sub”:“abcdef”,“email”:“”}