title: Microsoft Graph API Get Token 400
body: <p>My current technologies: React, Electron, Webpack</p>
  
  <p>This is the link that I am referencing: 
  <a href="https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_user" rel="nofollow noreferrer">https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_user</a></p>
  
  <p>So on number 3. Get a Token. I do a post using axios to<br>
  <a href="https://login.microsoftonline.com/common/oauth2/v2.0/token" rel="nofollow noreferrer">https://login.microsoftonline.com/common/oauth2/v2.0/token</a> HTTP/1.1</p>
  
  <p>with the body</p>
  
  <pre><code>{
  
      client_id=6731de76-14a6-49ae-97bc-6eba6914391e
      &amp;scope=user.read%20mail.read
      &amp;code=OAAABAAAAiL9Kn2Z27UubvWFPbm0gLWQJVzCTE9UkP3p
      &amp;redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F
      &amp;grant_type=authorization_code
      &amp;client_secret=JqQX2PNo9bpM0uEihUPzyrh
  }
  </code></pre>
  
  <p>This is just copied and pasted from their website.  When I do it I use my own client_id, code I get from the previous request and client secret.  However when I make this request, I get a 400.  Can you get a 400 from having non-valid parameter?  Also, I can't have a server running so I put down a fake <code>localhost:9000</code> which it errors out, but I am still able to parse the code from that URL.  So is it a problem not having a valid redirect_uri?</p>