Mapping drupal username - Fails at login

Created on 8 April 2024, 3 months ago
Updated 30 April 2024, about 2 months ago

Problem/Motivation

When a user logs in on our site, username shows Microsoft attribute displayName and it should be a mapping field userPrincipalName|username

πŸ’¬ Support request
Status

Fixed

Version

5.0

Component

User interface

Created by

πŸ‡¦πŸ‡©Andorra fgarciap

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

Comments & Activities

  • Issue created by @fgarciap
  • πŸ‡¦πŸ‡©Andorra fgarciap

    Now it shows when you try to login to page

    TypeError: Drupal\externalauth\ExternalAuth::load(): Argument #1 ($authname) must be of type string, null given, called in /mnt/tranfer/intranet/web/modules/contrib/o365/modules/o365_sso/src/Controller/UserLoginController.php on line 103 a Drupal\externalauth\ExternalAuth->load()

  • Assigned to fabianderijk
  • πŸ‡³πŸ‡±Netherlands fabianderijk Alphen aan den Rijn

    At this moment we cannot map the attribute. But I will see if I can create a new release with this feature. I can imagine this will happen more often.

  • πŸ‡¦πŸ‡©Andorra fgarciap

    OK Thanks fabian :)

    I attached new screenshot we have now. Is the same issue or a new one?

  • Status changed to Fixed 3 months ago
  • πŸ‡³πŸ‡±Netherlands fabianderijk Alphen aan den Rijn

    This is fixed in the 5.0.11 release version. On the admin page (/admin/config/system/o365/settings/sso) you can now enter the correct attribute to use for the username. The issue of the screenshot is something different, but it is fixed in the new release as well.

    The release is created, it may take some time before it is actually available.

  • πŸ‡¦πŸ‡©Andorra fgarciap

    Thanks fabian,

    I'm sorry, but on database nothing change after your new release. I've attached screenshots of my new test :)

    On admin/config/system/o365/settings/sso I've put 'mail' as attribute of Microsoft office 365 username. On database, name field still update with displayName attribute

  • πŸ‡³πŸ‡±Netherlands fabianderijk Alphen aan den Rijn

    Mmm, I think that happens because it only uses this setting on creation of the user. For now it doesn't update existing users.

    To fix this, I've created ✨ Update username on login Active that I will look into today.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024