'Failed to parse JSON object from response' while integrating Microsoft Defender for Cloud Apps with XSOAR

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

'Failed to parse JSON object from response' while integrating Microsoft Defender for Cloud Apps with XSOAR

L2 Linker

Hi,

I encountered the error 'Failed to parse json object from response: b'\r\n\r\n<!-- Copyright (C) Microsoft Corporation. All rights reserved.' when trying to integrate 'Microsoft Defender for Cloud Apps' using client credentials authentication method with XSOAR. Can someone help me to fix the issue. Since its an OOTB integration I believe there is no issue with the code.

 

Thanks in advance.

3 REPLIES 3

L3 Networker

Based on the error, it looks like you're getting a HTML response rather than JSON. That might mean your URL is incorrect, but it's hard to say for sure.

 

You can also get more detailed information about the API request/response by using the debug-mode=true argument on the command you're running.

L2 Linker

Hi,
do you know from where we can get the right MCAS URL?

we collected by using the following way, still the error is not resolved.
1. In the Defender for Cloud Apps portal, select the question mark icon in the menu bar. Then, select About.
2. In the Defender for Cloud Apps about screen, you can see the portal url.

Thanks

L3 Networker

That looks right according to the documentation, so unfortunately I think this is going to be hard to debug without the debug logs.

 

When run with debug-mode=true you should get a log file created in the incident where you ran the command that contains the full request/response contents as well as curl commands so that you can test them yourself.

 

Integrations should, in theory, provide the error message from the server to the person using the integration but this doesn't always work as expected (especially when the response is in an unexpected format), so the debug logs can help with that. 

 

If the page is an error response of some kind the page should hopefully provide more details on what the problem is and how you can fix it.

  • 1604 Views
  • 3 replies
  • 1 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!