No e-mail address provided by windows_aad

Created on 22 September 2023, 9 months ago
Updated 8 February 2024, 5 months ago

Problem/Motivation

I am getting this error

No e-mail address provided by windows_aad

from

TypeError: Drupal\openid_connect_windows_aad\Plugin\OpenIDConnectClient\WindowsAad::retrieveUserInfo(): Argument #1 ($access_token) must be of type string, null given, called in xxx/web/modules/contrib/openid_connect/src/OpenIDConnect.php on line 247 in Drupal\openid_connect_windows_aad\Plugin\OpenIDConnectClient\WindowsAad->retrieveUserInfo() (line 357 of xxx/web/modules/contrib/openid_connect_windows_aad/src/Plugin/OpenIDConnectClient/WindowsAad.php)

Steps to reproduce

Proposed resolution

Our AD not sending access_token, so use the $tokens['id_token'] to $userinfo as well and email is shared in an array format as emails and fetch email from emails array

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇮🇳India kanchamk

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

Comments & Activities

  • Issue created by @kanchamk
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    100 pass
  • 🇮🇳India kanchamk

    Here is the new patch for proposed solution.

  • Status changed to Closed: outdated 9 months ago
  • 🇮🇳India kanchamk

    Attached related issue.

  • 🇺🇸United States mturumella

    I am still getting the same error after applying these patches

    openid_connect (3.0.0-alpha2)
    openid_connect_windows_aad(2.0.0-beta5)

    TypeError: Drupal\openid_connect_windows_aad\Plugin\OpenIDConnectClient\WindowsAad::retrieveUserInfo(): Argument #1 ($access_token) must be of type string, array given, called in /my/website/site/public_html/web/modules/contrib/openid_connect/src/OpenIDConnect.php on line 247 in Drupal\openid_connect_windows_aad\Plugin\OpenIDConnectClient\WindowsAad->retrieveUserInfo() (line 357 of /my/website/site/public_html/web/modules/contrib/openid_connect_windows_aad/src/Plugin/OpenIDConnectClient/WindowsAad.php).

Production build 0.69.0 2024