Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In order to fully integrate the auth module with our external IdP, we'd love to be able to map additional attributes to user fields.
E.g. when the user entity has text fields like 'Given Name', 'Last Name', 'Display Name', which are provided as user attributes by the IdP, it would be great having them synchronized at login as well.
At the time being this works for the username and user groups only.
Comments
Comment #2
dmundraThere appears to be a hook: http://cgit.drupalcode.org/simplesamlphp_auth/tree/simplesamlphp_auth.ap... called "hook_simplesamlphp_auth_user_attributes" that you can call in a custom module to do the mapping.
Comment #3
dmundraI created this sandbox module https://www.drupal.org/sandbox/dmundra/2934777 that does attribute mapping.
Comment #4
dakku CreditAttribution: dakku commentedThanks dmundra. Maybe a good idea to point a link from the docs page to your sandbox example?
Comment #5
dmundra@dakku, I would be fine with that. Should I go ahead and make a page?
Comment #6
dakku CreditAttribution: dakku commentedHi @ dmundra.
How about we add a child page here?
https://www.drupal.org/node/2402399
Comment #7
dmundra@dakku, done: https://www.drupal.org/node/2935428. Does it work for you?
Comment #8
dakku CreditAttribution: dakku commented@dmundra
Thank you. That documentation page is great.