Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Support_Microsoft_account_UPN_changes" does not convert Moodle usernames to lower case #2399

Closed
mariofroeschl opened this issue Oct 30, 2023 · 6 comments · Fixed by #2462, #2463 or #2464
Closed
Assignees
Labels
Feature - SSO Issue type - bug Bugs in existing code that needs to be fixed. Plugin - auth_oidc Plugin - local_o365 Status - PR ready / pending release Dev is done and PR ready. Will be included in the next release.
Milestone

Comments

@mariofroeschl
Copy link

mariofroeschl commented Oct 30, 2023

It seems the new Feature "Support_Microsoft_account_UPN_changes" (https://docs.moodle.org/401/en/Microsoft_365#Support_Microsoft_account_UPN_changes) does not correctly convert the retrieved UPN to lower case, when it should be used as Moodle username.

Example:

Precondition:
Support_Microsoft_account_UPN_changes enabled
User in Moodle: old.test1@example.com
Related user in Azure (UPN): New.Test1@example.com

Actual result after synch (when user tries to login):
Error: "The username must be in lower case".

Expected:
The plugin converts the UPN to lower case, when using it as username.
-> new.test1@example.com

Tested on Moodle 4.1.6

@skuti-is
Copy link

I have issue with "Support_Microsoft_account_UPN_changes" and am trying to find why, Is there a change regarding this from OpenID Connect / auth_oidc 4.2.0 to 4.2.2?

@weilai-irl
Copy link
Collaborator

Hi @mariofroeschl

Thank you for reporting the issue. I acknowledge the issue - I managed to recreate it in my environment.

I have provided a fix in the linked PRs. They will be tested and included in the next release.

Regards,
Lai

@weilai-irl
Copy link
Collaborator

Hi @skuti-is

UPN change support is a new feature added in release 4.2.1, so it wouldn't exist in 4.2.0 release. The feature is disabled by default.

If you have any particular question about the feature, please ask in a separate issue.

Regards,
Lai

@kkiiskin
Copy link

Hi @weilai-irl

is the fix for uppercase UPN problem going to be released soon?
We have lots of problems with that.

@weilai-irl
Copy link
Collaborator

Hi @kkiiskin

The release will happen either between 11th and 14th of March, or 8th and 12th of April, depending on how the testing goes. The testing is starting from this week. We apologise for the delay, which is caused by a some sponsored feature requests to be included in this release.

Regards,
Lai

@weilai-irl
Copy link
Collaborator

Hi all,

The fix to this issue has been included in the releases from today.

Thank you very much for reporting the issue. Please check the latest version out and see if it works.

Regards,
Lai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment