Error : AADSTS900561: The endpoint only accepts POST, OPTIONS requests. Received a GET request while retrieving access token

Prabhat Gupta 61 Reputation points
2022-07-23T09:08:33.067+00:00

I am trying to get access token using device_code, but when I send the http request to the authorization server then I am getting below error message -

=================================================================

*Sign in  
  
Sorry, but we’re having trouble signing you in.  
  
AADSTS900561: The endpoint only accepts POST, OPTIONS requests. Received a GET request.*  

==================================================================

Please help me solve this issue. I am using below URL for sending the http request from the browser-

https://login.microsoftonline.com/<tenent_id>/oauth2/token?grant_type=urn:ietf:params:oauth:grant-type:device_code&client_id=<client_id>&device_code=<device_code>

Please let me know if you need any other information from my side.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,427 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Marilee Turscak-MSFT 36,841 Reputation points Microsoft Employee
    2022-07-25T22:38:35.06+00:00

    Hi @Prabhat Gupta ,

    The AADSTS900561 error typically occurs when 3rd party cookies are being blocked by certain browsers.

    If you are using Chrome, you may need to add , you may need to add https://login.microsoftonline.com to your list of trusted sites.

    In Chrome, go to:

          Settings – Advanced – Content Settings  
          Cookies – Allow – ADD – “login.microsoftonline.com”  
         Unsandboxed plugin access – Allow – ADD – “login.microsoftonline.com”  
    

    You may also need to add "https://autologon.microsoftazuread-sso.com/"

    In addition, if you haven't done so already, you should go to Chrome > Settings > Cookies and other data and unselect "Block third party cookies".

    224535-image.png

    If none of these steps work, you can go to the nuclear option and clear your cache and get rid of all cookies. While killing the browser cache can be inconvenient, it is one way to resolve this issue.

    If none of these options work, feel free to reach out to me and I will be happy to continue troubleshooting over email or by opening a support case.

    -

    If the information provided was helpful, please remember to "mark as answer" so that others in the community with similar questions can more easily find a solution.

    6 people found this answer helpful.

  2. xasan axmed xasan 10 Reputation points
    2023-05-18T02:46:41.3233333+00:00

    My Name Hassan Ahmed my Facebook profile account disabled my Facebook username Name Hassan Ahmed my Hotmail is xasan20021@hotmail.com Hotmail my username xasan axmed xasan so I need help please help please help

    2 people found this answer helpful.
    0 comments No comments

  3. 1402 5 Reputation points
    2023-04-08T05:35:25.4533333+00:00

    I am facing problem while opening one drive. I have uploaded all important documents in it. Also I have pay of rupees 1500 to lifetime. Pay charges to onedrive

    I have attached screen shot with this mail. Please go through it and help me to solve my problem. Onedrive

    Onedrive 1

    1 person found this answer helpful.

  4. xasan axmed xasan 10 Reputation points
    2023-05-18T02:47:58.2333333+00:00
    Header 1
    Xasan20021@hotmail.com
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.