MS teams integration with mendix

Hi , I tried to Integrate teams with mendix , I need create a team(Group) in MS team from mendix , For that I created MS 365 E5 developer account and login that in Azure portal. Then Register app and copied client and tenant ID and gave API permissions to access MS teams.Create Client secret Value and copied it. Generated token with these and call the microflow of token generation in another microflow to create team(Group) in MS teams , Created Body and Call it in Call REST activity . I got Respose like {"error":{"code":"InvalidAuthenticationToken","message":"CompactToken parsing failed with error code: 80049217","innerError":{"date":"2021-07-21T08:33:04","request-id":"c5954559-f3c5-4928-839e-a66a6ba6fcf2","client-request-id":"c5954559-f3c5-4928-839e-a66a6ba6fcf2"}}}   Error :  Error calling REST service     at MyFirstModule.ACT_Teams_CreateGroup (CallRest : 'Call REST (POST)') Advanced stacktrace:     at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:57) Caused by: 401: Unauthorized     at MyFirstModule.ACT_Teams_CreateGroup (CallRest : 'Call REST (POST)')   Create Teams microflow Token Generation Microflow :
2 answers

Hi Vinith,

This "code":"InvalidAuthenticationToken", can be caused because of Bad Request ,Check Your Body token and Location Url.  even one small apostrophe( ‘ ) can caused this Error ,Check your Body token and Location Url Request Matching with the document which i shared in the Link “


You can see the exact request and response body by setting the Rest Consume log level to Trace. That may help you in understanding what’s going wrong. You can also copy-paste your request body into Postman for testing.