Microsoft Graph REST API invalid client secret
<p>I have the following POST call I need to make. However, even if I provided the right client id and secret id, my call is getting rejected.</p>

<pre><code>    curl POST https://login.microsoftonline.com/f02....e3/oauth2/token
 -H 'Content-Type: application/x-www-form-urlencoded'  --data 'grant_type=authorization_code&amp;redirect_uri=https://requestb.in/ac&amp;
source=https://graph.microsoft.com&amp;client_id=1e1....-913d9
&amp;client_secret=YmbSFYz.....4Uk=&amp;scope=mail.read&amp;code=AaAAA........on0a569'
</code></pre>

<p>This is the error I receive: </p>

<pre><code>    curl: (6) Could not resolve host: POST
    {"error":"invalid_client","error_description":"AADSTS70002: 
Error validating credentials. AADSTS50012: Invalid client secret is
 provided.\r\nTrace ID: 78d...a2b\r\nCorrelation ID: 
01....ab2\r\nTimestamp: 2016-12-14 01:46:47Z","error_codes":[70002,50012],"timestamp":"2016-12-14 01:46:47Z","trace_id":"78d....a2b","correlation_id":"018.....ab2"}
</code></pre>

<p>How could I resolve this ?</p>

<p><strong>EDIT:</strong> I am trying to achieve the second section(i.e getting token) in <a href="https://graph.microsoft.io/en-us/docs/get-started/rest" rel="noreferrer">this documentation</a> </p>