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

App Claims not being populated in Moodle #10

Open
daniel-hefley opened this issue Sep 3, 2021 · 2 comments
Open

App Claims not being populated in Moodle #10

daniel-hefley opened this issue Sep 3, 2021 · 2 comments

Comments

@daniel-hefley
Copy link

Hi,

We've come across an issue where the AzureB2C application claims are not being populated in Moodle despite following these instructions: #7

We believe the issue is with this section of code:

// B2C provides custom field mapping, skip azureb2c mapping if B2C is present. $o365installed = $DB->get_record('config_plugins', ['plugin' => 'local_o365', 'name' => 'version']); if (!empty($o365installed)) { return []; }

https://github.com/GopalSharma/moodle-auth_azureb2c/blob/master/classes/loginflow/base.php#L101

If I'm not mistaken, this code checks whether the local_o365 plugin is installed and if so, skips B2C mapping. In our particular case, the site has the o365 plugin suite installed for it's Teams integration feature and cannot be uninstalled. Would it be possible to adapt the code so B2C mapping will still work despite the local_o365 plugin being installed?

Thanks in advance.

@GopalSharma
Copy link
Owner

GopalSharma commented Sep 3, 2021

@daniel-hefley

I don't think there will be any impact on this plugin of local_o365 plugin being installed or not.
You can simply comment out these lines which you might think are returning empty. This plugin is independent and does not require any other plugin to be installed or uninstalled.
Please, check there could be other issues.

@tim1mw
Copy link

tim1mw commented Nov 3, 2022

I have this problem as well, my Moodle uses both azureb2c and oidc with local_o365, we have both configured, oidc+local_o365 for staff login and azureb2c for customers. So removing local_0365 is not an option.

I've commented out this code so that the claims will sync, but that not good practice going forward since updates to the plugin will wipe out my patch and break new logins. If local_o365 is of no consequence to this plugin can all references to it be stripped out in the core version? If local_0365 can be used in some circumstances, could this be controlled by a config option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants