SSO OAuth2 Issue

SSO OAuth2 Issue

by Manny Singh -
Number of replies: 1
Hi, 

We are experiencing an issue, where end users that have SSO (OAuth2) enabled on their site, are not able to log into the site.
They are returned with an error code of:

Could not upgrade oauth2 token. http status for remote endpoint: 0

We have checked logs and everything seems fine. Could there be an issue from Microsoft where the SSO is failing. 

Does anyone know how to resolve this and what the issue could be?

Any advice/help is much appreciated.

Thanks



Average of ratings: -
In reply to Manny Singh

Re: SSO OAuth2 Issue

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

... http status for remote endpoint: 0

This suggests that the network connection to the OAuth 2 issuer (Microsoft) could not be made. Possibly there's something blocking your Moodle web server from making outbound network connections, such as SELinux.

You could try a connection attempt as the user your web server runs PHP as, for example:

(Change apache to whatever your web server runs PHP as). This would show whether the user can establish the connection to the token endpoint. If this works run getenforce to see if SELinux is enabled.

Average of ratings: Useful (1)