Adding the optional subject key configuration in the form.
This allows the admin to choose which immutable token parameter to use as the mapping between Azure AD accounts and Drupal users.
- "sub" is unique per user, but varies across AD application registrations.
- "oid" is unique per user and common accross all applications in the same tenant.
- See https://docs.microsoft.com/en-us/azure/active-directory/develop/active-d... for further details.
The default "sub" is sufficient in most cases. However "oid" is useful if you want to use AD auth tokens to request access to other services and verify the user id. For example the windows graph API does not return the sub, but will return the oid in its "id" parameter. Also to sync databases between environments that use different app registrations, users will not map properly if "sub" is used.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | openid_connect_windows_aad-access-token-parameter-3008341-2.patch | 1.18 KB | MorinLuc0 |
| #3 | openid_connect_windows_aad-access-token-parameter-3008341-3.patch | 3.27 KB | acrazyanimal |
Issue fork openid_connect_windows_aad-3008341
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
MorinLuc0 commentedComment #3
acrazyanimal commentedUpdated patch that uses decodeIdToken() to implement the option to use oid vs sub Id token properties for mapping the AD account to Drupal user.
Comment #4
acrazyanimal commentedUpdated the description with more details.
Comment #5
acrazyanimal commentedComment #7
webflo commentedComment #10
webflo commentedCommitted to 2.x. Thanks to @acrazyanimal and @MorinLuc0