Unable to verify new OAuth provider (MS365)

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
jfourneau
Posts: 3
Joined: Tue Oct 25, 2022 5:02 pm

Unable to verify new OAuth provider (MS365)

Post 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
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Unable to verify new OAuth provider (MS365)

Post 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'); ?>
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
jfourneau
Posts: 3
Joined: Tue Oct 25, 2022 5:02 pm

Re: Unable to verify new OAuth provider (MS365)

Post 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.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Unable to verify new OAuth provider (MS365)

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
jfourneau
Posts: 3
Joined: Tue Oct 25, 2022 5:02 pm

Re: Unable to verify new OAuth provider (MS365)

Post by jfourneau »

That did it. Thank you for your quick reply!
Post Reply