title: Microsoft Access Token Request Error - 400 Bad Request
body: <p>I am trying to get access token from access code. but there is a error of 400 Bad Request error</p>
  
  <p>I am using this link to get Access code</p>
  
  <p><a href="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&amp;response_type=code&amp;redirect_uri=http://localhost/Home/About&amp;scope=mail.read" rel="nofollow noreferrer">https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&amp;response_type=code&amp;redirect_uri=http://localhost/Home/About&amp;scope=mail.read</a></p>
  
  <p>in response of this link i am getting the code in query string with return url
  code=Mh12d04c8-8ea9-c82b-8cc5-b93cf913382c</p>
  
  <p>i am using this code to get access token</p>
  
  <p><a href="https://login.microsoftonline.com/common/oauth2/v2.0/token?redirect_uri=http://localhost:51296/Home/AAA&amp;client_id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&amp;client_secret=Rmi2PNLPNM5agLh5aT5G82W&amp;code=Mh12d04c8-8ea9-c82b-8cc5-b93cf913382c&amp;scope=mail.read" rel="nofollow noreferrer">https://login.microsoftonline.com/common/oauth2/v2.0/token?redirect_uri=http://localhost:51296/Home/AAA&amp;client_id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&amp;client_secret=Rmi2PNLPNM5agLh5aT5G82W&amp;code=Mh12d04c8-8ea9-c82b-8cc5-b93cf913382c&amp;scope=mail.read</a></p>
  
  <p>But it is giving 400 Bad Request. please help me to solve this issue.</p>