microsoft / o365-moodle

Office 365 and Azure Active Directory plugins for Moodle
GNU General Public License v3.0
180 stars 136 forks source link

AD B2C with user flows not working #2098

Open cfiazek opened 2 years ago

cfiazek commented 2 years ago

Dear o365-moodle team

Thanks a lot for that amazing plugin. We are currently migrating to moodle 4 and Microsoft IDM (from CAS) as the new SSO solution. For our students, we use in teh current test environment a AD B2C tenant with user flows:

image

This is for being able to cusomize SSO for different branded portals within one tenant. When using user flows, it's not possible to set any other MS Graph Delegate Permissions than offline_access and openid:

image

On the Application permissions, we granted all required permissions according to your documentation. Also on the App registration itself, we granted the available permissions (only those are selectable):

image

When running the user flow against the following reply URL "https://***/auth/oidc/", I can enter the login credentials (local B2C user) but get the following error message:

image

Did anyone get this scenario running?

Thanks and have a nice evening! Chris

weilai-irl commented 2 years ago

Hi @cfiazek,

Most of the development and testing of the plugins has done in standard Azure AD rather than B2C. It does look like the Azure app setup in B2C is different from those in standard Azure AD, which may result in errors in the integration. Unfortunately I don't have a straight answer for you on how to resolve it. Let's see if other community users can help.

At the same time, I'll try to source a B2C Azure AD to try to reproduce the issue, but this may take some time.

Regards, Lai