No email address provided by windows_aad

Created on 10 April 2025, 3 days ago

Having changed nothing for quote some time (years) in either Azure or this plugin configuration I've started to get the following error and my users can't login.

No email address provided by windows_aad

I'm a bit reluctant to change any of my app settings in Azure because I don't understand them fully.

The response back to my app looks like this

/openid-connect/windows_aad?code=1.ATkAqARVGcV3vUKXttHpert_M8vnqB53DIZDvQ2SZXwrcWzgADs5AA.AgABBAIAAABVrSpeuWamRam2jAF1XRQEAwDs_wUA9P9W2k8-w2u7NTtiMCsLv81qow3BTrjIvSHm3ALwfqp6yWU3li326TMn4DLgKl-cHP4hhjueJAkQKq4cBpKCdsqZ9uKFVeUe_gCvv2nG0KyuJWqcx-DitWGxCmRnC0IzBPy4fwYq6lVr7TVNRKAxUxqw_t0OxMXlOHvT3zB2D3UTgZgB5mhHZUapjKjK7ix4Ljwmwv7b-4LWCb028GEho29BQu_2NL5mxDAFAf87KNAi6oXOLGCIz8nUsRmT4vjtREqLc5NAKeoNEfjv0NBeHJXybaZCeFuthQqS3LQ9irVBrecOAQr4i7w1kz1CezXB09NfWsHpKPAQp40kXusyxBJrTtniKRySKCYnPaIimpLADLOPT0tLy54trrW5_3sqcV3PSecmSLvMS6OJ40wZ8cbLypBZFaydCKQcEmU43FWKihHOjSW4zcxw-5JmlBR8jT5HmQihhdTbM2dy3sQKXEwHLBfpLYVne3zF6aa0yqLQI4SbOc-GzPOmPq_7NTLMPFigLFazVT4kENVl2FrIc7wSNE-OUfmRuZ2uLaZF69pCtTPApe4RIRvYSQ4Pa78QhqhosKogye31hhatCppPkLdWZXyMTdumoraBVf9Ic3VjfBEZFatMXlIaqse4b5iDmhVWjB4LtBoxC3GR9hyrjZiEsQ5jSncjqNgj3f4qRTE2avTF7rHTV3wWCzTuO6PxDXK5bSj_H3iuSi4rns7VWVtIcNVW&session_state=003e9789-1ea3-ccc1-e9ee-5b86215f40cb&state=HloGxc62mNO42PIQnNSTx_niC1T_rdhGwk2KELgd3xY

The following options don't work
Alternate or no user endpoint
Azure AD Graph API (v1.6)

The following does work
Microsoft Graph API (v1.0)

My guess is that something has changed at the Azure side?

Any help would be appreciated Dan

๐Ÿ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom danharper

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @danharper
  • Same issue here since this morning. Also trying to understand the issue.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium Den Tweed

    Same issue here, some deeper diving brought up that the userinfo endpoint ( https://graph.microsoft.com) returns a 403 forbidden for some accounts while others receive a 200

    The error message returned is

    {"odata.error":{"code":"Authentication_Unauthorized","codeForMetrics":"Authentication_Unauthorized","message":{"lang":"en","value":"Access blocked to AAD Graph API for this application. https:\/\/aka.ms\/AzureADGraphMigration."}}}

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mbopp Grand Rapids, MI

    My client is also experiencing this, and it has become an urgent issue preventing access to the site.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mbopp Grand Rapids, MI
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany webflo

    ๐Ÿ› No e-mail address provided by windows_aad after SSO authorization Needs review is a similar issue. I looks like some configurations are not supported anymore. Could someone post screenshots from the exact Azure configuration? Configured grants, access token/id token claims etc. This would help to reproduce the issue. Thanks!

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mbopp Grand Rapids, MI

    Thanks @webflo. Unfortunately, I do not have access to the Azure configuration. I will try the patch provided on the related issue.

  • We are encountering the same issue. I have admin access to both our Drupal and Azure environments. Thereโ€™s no apparent issue in Azure. Even tried reissuing the key, to no avail.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany webflo

    @mbopp and @ian_swan Could you provide a screenshot from the Drupal configuration? Thanks!

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany webflo

    I think the cause of the problem is that the API call \Drupal\openid_connect_windows_aad\Plugin\OpenIDConnectClient\WindowsAad::buildUserinfo fails and this causes the profile data from ID and Access token.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany webflo

    Try to switch to "Alternate or no user endpoint" or "Microsoft Graph API (v1.0)" (make sure the User.Read scope is configured. The following adds the scope automatically on request.

  • ๐Ÿ‡น๐Ÿ‡ณTunisia drupaldevgirl

    @den tweed Do you founded a solution ? i have the same problem.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States pfrilling Minster, OH

    We started seeing this error yesterday too. Our configuration is currently using the Azure AD Graph API (v1.6). I did a quick search online about that and it appears that API is being retired by Microsoft. Googleโ€™s AI Overview after searching that API returned this:

    The Azure AD Graph API (v1.6) is being retired, with its functionality replaced by Microsoft Graph. New applications are already unable to use it, and all applications will lose access on June 30, 2025, unless they have configured extended access. Microsoft recommends migrating to Microsoft Graph.

    Microsoftโ€™s blog article about it is here: https://techcommunity.microsoft.com/blog/microsoft-entra-blog/action-req...

    I'm going to see if the suggestions from @webflo in #11 work for our use case and will report back.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States pfrilling Minster, OH

    Confirming that changing the "User info endpoint configuration" option from Azure AD Graph API (v1.6) to Microsoft Graph API (v1.0) fixed the login issue in my use case.

  • This also resolved our authentication issue!

  • ๐Ÿ‡ง๐Ÿ‡ทBrazil pfeiffer

    I was having the same issue, just changing to Microsoft Graph API (v1.0) fixed the issue.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mbopp Grand Rapids, MI

    Fixed for us as well. Thank you @pfrilling

    • webflo โ†’ committed 6219c4c1 on 2.0.x
      Issue #3518500: Deprecate Azure AD Graph API option in settings form
      
Production build 0.71.5 2024