Username template importer returns null values for claim with microsoft social login

In a special case scenario, I wish to overwrite broker id for users using microsoft as their social login to be their username/email instead of the “id” it usually is. In order to do this I have configured a username template importer mapper that takes the value from claim and maps the broker id accordingly. I have already tried different values that come in the claim by going through the claim object. All of them return null. (refer for claim values)

Please refer the screenshot for mapper configuration and output.

Another important thing to note is that this worked for google! I used ${} for google based on their access token and it works as expected.

Keycloak version : 21.1.2