Hi Dhiman,
For the exact below error we solved it by making the IDM user as Technical User in the source system. The action was already assigned to the IDM role hence was not relevant in our case.
FromSPML got exception
org.openspml.util.SpmlException: XML Error :6:2: The markup in the document following the root element must be well-formed.
Cheers,