Page 1 of 1

Unable to verify new OAuth provider (MS365)

Posted: Tue Oct 25, 2022 5:25 pm
by jfourneau
Script URL:
Version of script:
Hosting company: On-Prem
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: OAuth

Write your message below:

I am having trouble adding the MS365 OAuth provider. I am getting through all of the steps, but after logging in with mail user's credentials, I am getting a 500 page. I have tried going through the process in incognito to be sure I am not logged into MS365 as any other user. I have also set the server to debug mode and tried to generate an error with a modified oauth_functions.inc.php file from another post, but just get the same results.

"This page is not working. server.domain.com is currently unable to handle this request."
HTTP ERROR 500

Re: Unable to verify new OAuth provider (MS365)

Posted: Tue Oct 25, 2022 5:28 pm
by Klemen
This most likely means that cURL is not enabled in your PHP.

What do you get if you save this as text.php and run on your server?

Code: Select all

<?php echo "cURL is " . (function_exists('curl_init') ? 'enabled' : 'disabled'); ?>

Re: Unable to verify new OAuth provider (MS365)

Posted: Tue Oct 25, 2022 5:39 pm
by jfourneau
Just to make sure I am understanding you correctly, I created a file named text.php with the code you included and dropped it into the root of my site (https://server.domain.com/text.php).

This returns a blank page when I navigate to it.

Re: Unable to verify new OAuth provider (MS365)

Posted: Tue Oct 25, 2022 5:44 pm
by Klemen
That's exactly what I meant, yes. It's valid PHP code so not sure why you would get an empty page.

In either case, enable cURL in your PHP installation, restart the server then try again.

Re: Unable to verify new OAuth provider (MS365)

Posted: Tue Oct 25, 2022 5:57 pm
by jfourneau
That did it. Thank you for your quick reply!