ferruzzi commented on code in PR #35926:
URL: https://github.com/apache/airflow/pull/35926#discussion_r1412478458


##########
airflow/providers/fab/auth_manager/security_manager/override.py:
##########
@@ -2150,7 +2150,7 @@ def get_oauth_user_info(self, provider: str, resp: 
dict[str, Any]) -> dict[str,
             log.debug("User info from Azure: %s", me)
             # 
https://learn.microsoft.com/en-us/azure/active-directory/develop/id-token-claims-reference#payload-claims
             return {
-                "email": me["email"],
+                "email": me["upn"] if "upn" in me else me["email"],

Review Comment:
   ```suggestion
                   "email": me.get("upn", me["email"]),
   ```
   
   ```
   In [1]: me = {"email": 2}
   In [2]: me.get("upn", me["email"])
   Out[2]: 2
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to