Microsoft Online OAuth2 Token cannot handle Content-Type with given Charset RRS feed

  • Question

  • Hello,

    i am trying to get the oauth token via post to


    When i set this settings to the headers it is working fine! But i have build my application backend with java and spring and spring is overriding the Content-Type to application/x-www-form-urlencoded;charset="UTF-8". 

    If i try to post with given charset, does not matter what charset, i always get an error and cannot get the token!

    This should be fixed! Microsoft should be able to handle given charset inside the header. 

    curl --request POST \
      --url \
      --header 'Accept: */*' \
      --header 'Content-Type: application/x-www-form-urlencoded;charset="UTF-8"' \
      --header 'Postman-Token: 99b8afdb-b4fc-4cfc-812e-059a256ef6d2' \
      --header 'cache-control: no-cache' \
      --data 'grant_type=password&client_id=abc&resource=abc&scope=openid&username=abc&password=abc'
    A post like this should work! But it does not! I get invalid_request! I have reported this to spring to, that they should fix the hard setted charset and they did it, BUT they only give the possibility to override the charset and not deleting it completely. They said it is a microsoft bug and i think it truely is one. So please fix this issue, so that give charset parameter are excepted when posting to get microsoft token.

    • Edited by Plankton93 Wednesday, March 27, 2019 10:56 AM
    Friday, March 22, 2019 2:15 PM