I am trying to get a token from a microsoft url. I have tried various different ways but it doesn't seem to work for me.
Below is the code I am writing in the HTTP trigger, I was trying to do a OAuth2 request.
{
"inputs": {
"method": "POST",
"uri": "https://login.microsoftonline.com/c4fc2879-f0f4-45cd-8cb5-f17f4a078158/oauth2/token",
"headers": {
"Content_Type": "application/x-www-form-urlencoded"
},
"body": "grant_type=client_credentials&client_id=<>&client_secret=<>&resource=<>
}
}
I have added in the client id and client secret, also the resource but it doesn't seem to work.