AADSTS900561: The endpoint only accepts POST, OPTIONS requests. Received a GET request. when running PHP script

Thomas Andersson 6 Reputation points
2021-03-15T09:53:43.617+00:00

Hi,

We have a PHP script that tries to login to

"https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token". it has worked perfectly up until 3 days ago.

Now we get this error

"AADSTS900561: The endpoint only accepts POST, OPTIONS requests. Received a GET request."

We have made no changes, i have verified that i can login with the account to office 365 and that works fine.

But when i tries to connect to our app at Azure it has stopped working.

Any ideas?

I have read most postas around with no luck yet.

Best regards

Thomas

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,409 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 27,111 Reputation points Microsoft Employee
    2021-03-16T03:17:22.137+00:00

    Hi @Thomas Andersson ,

    Since you've made no changes, I would verify everything is in order with the app registration. Is the logout URL set correctly and the client secret still valid? Where in the oauth flow do you get AADSTS900561? Also, have you verified sign-in works in something like Postman?

    Regards,
    Ryan