Hello there folks.
We are using Open ID Connect with Entra ID for our users.
We noticed something not working when the users try and login to Moodle, their email from AD/Entra ID's "mail" field is not updated or mapped automatically to the Data mapping (Email address): auth_oidc | field_map_email field in Moodle. It is currently set as "Email"

Is the value Email mapped to our AD/Entra ID's "mail" object/field as shown below?

Also the principal name looks like the correct format and preferred email format. Can we use that instead of mail and if so, how can we use UPN to pull it from AD to Moodle user's email field every time they log in or sync'd as a task BUT THE USER CANNOT EDIT THAT EMAIL FIELD?

We changed the email on moodle to something else and when the user logs in, it did not update it from the "mail" or "userPrincipalName" field in AD/ Entra ID as I think it should.
How can we check to make sure it pulls it from AD/Entra ID?
Can we map the userPrincipalName in our AD /Entra ID and use it as the "Email" field in the user's profile? If so, how and when it is updated in our AD / Entra ID, it is always looking for it to update it and not the user (locked for them).
I saw this in the Authentication --> OpenID Connect --> Field mappings
I don't know what that means. Maybe a clue? some that we need to do on Entra side to pull the mail as "email" in graph?
Thank you.