oidc returns 403 from proxy after CONNECT on Azure AD (EntraID)

oidc returns 403 from proxy after CONNECT on Azure AD (EntraID)

by Zoran Jančić -
Number of replies: 0
Picture of Particularly helpful Moodlers
Moodle 4.3

Installed and configured IdP Azure AD v1.0 app on Azure. 
Installed and configured OpenID Connect plugin 4.3.0 (2023100900) and O365 plugin.

Users can see button for Azure AD auth on Moodle's login page and can click on it. It redirects to company's Azure login dialog but when user enters credentials, tokenrequest method in /auth/oidc/classes/oidcclient.php returns: HTTP code 403 from proxy after CONNECT. The server is behind proxy, but the proxy is configured in Moodle settings. So, the problem is in token endpoint .../oauth2/token which returns 403 error. I tried calling token endpoint from linux shell on Moodle server using curl command and got the same error: Received HTTP code 403 from proxy after CONNECT.

Any ideas how to solve this? What am I missing?

Average of ratings: -