Assertion is malformed and cannot be read! - in the REST (POST) call

1
I have been trying to implement microsoft office 365 API – Access Token generation, in which i am posting a request body in form of x-www-form-urlencoded where it doesn’t getting through the REST call due to the following error. {"error":"invalid_grant","error_description":"AADSTS500132: Assertion is malformed and cannot be read.\r\nTrace ID: 9aaad783-cf0c-48af-888c-b497e8681000\r\nCorrelation ID: 865f2703-c20b-4d00-b293-b05fab4c9e0f\r\nTimestamp: 2020-03-29 18:46:11Z","error_codes":[500132],"timestamp":"2020-03-29 18:46:11Z","trace_id":"9aaad783-cf0c-48af-888c-b497e8681000","correlation_id":"865f2703-c20b-4d00-b293-b05fab4c9e0f","error_uri":"https://login.microsoftonline.com/error?code=500132"} Here, you can find the actual implementation of the request and its body.     And i tested the same API in postman by copying the Assertion content i got in Mx end and pasted it in postman, it is working perfectly fine. looking for the great suggestion! thanks.  
asked
1 answers
3

Hi Abdul, we can use “urlEncode” function to overcome the assertion problem

Create a variable  and pass the URL in the urlEncode function

 

https://forum.mendix.com/link/questions/96222

answered