XML Validation in APIM policy not working correctly

Johnson, Dana 0 Reputation points
2026-07-31T12:43:27.26+00:00

Gents, I'm trying to validate an XML document against an XSD schema using the following:

<validate-content

unspecified-content-type-action="prevent"

max-size="1048576"

size-exceeded-action="prevent"

errors-variable-name="validationErrors">

<content

    type="application/xml"

    validate-as="xml"

     schema-id="MySchema"

    action="prevent" />
</validate-content>

The Validate Content does not work no matter what I add or change in the properties

Any suggestions would be greatly appreciated

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.