Oauth Azure AD configuration help

I’ve enabled third-party authentication and configured Azure as the backend authentication.
I’ve created the enterprise application.
The login page shows Microsoft as a sign-in option.
After logging in with Microsoft ID, it returns to the authentication page of tutor with the error.

“We are sorry, you are not authorized to access XYZ via this channel. Please contact your learning administrator …”
Error details
your credentials are not allowed. "

checking the LMS logs

[openedx.core.djangoapps.cors_csrf.helpers] [user None] [ip x.x.x.x] helpers.py:64 - Origin ‘https://login.microsoftonline.com’ was not in CORS_ORIGIN_WHITELIST; full referer was ‘https://login.microsoftonline.com/’ and requested host was ‘xyz.com’; CORS_ORIGIN_ALLOW_ALL=False

INFO 11 [social] [user None] [ip x.x.x.x]] middleware.py:43 - Your credentials aren’t allowed

I’ve tried to edit the common.py and change the value CORS_ORIGIN_ALLOW_ALL=True

Please share if someone has successfully enabled oAuth with AzureAD as the backend.

Hi @Med, welcome to the forum!

Did you follow the instructions? Note that Azure Active Directory now was renamed to Entra Id and things have changed a bit.
It doesn’t look to me a CORS problem. I think it might be that the domain is not validated, or one of the URLs is incorrect.