SAML metadata import by REST API

Hi all,
On KC 23.0.3, I have the requirement to import an IDP metadata XML file through REST calls, but am unable to make the client-description-converter API to work.
Trying the conversion XML → JSON, the result in console is: " Cannot invoke “org.keycloak.dom.saml.v2.metadata.SPSSODescriptorType.isWantAssertionsSigned()” because “spDescriptorType” is null"

But the same metadata file can be imported with no trouble in the KC admin console.
Any idea of what is missing?

To give more details, client-description-converter accepts a modified metadata file with a dummy added line:
<md:SPSSODescriptor WantAssertionsSigned=“true” protocolSupportEnumeration=“urn:oasis:names:tc:SAML:2.0:protocol”/>
but <md:IDPSSODescriptor… part is not parsed.

What am I missing?