NickolajA / ConfigMgrWebService

48 stars 35 forks source link

SOAP API Request: Filter with [ ] does not work #36

Open w3ich3rt opened 2 years ago

w3ich3rt commented 2 years ago

Hey guys,

we are using the WebService (1.8.0) and I have a problem when requesting the GetCMDeviceCollection endpoint. I'll use the python requests library and the payload looks like this:

<!--  Secret is removed. -->

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
      <soap12:Body>
           <GetCMDeviceCollections xmlns="http://www.scconfigmgr.com">
           <secret>XXXXXXX-XXXXXXX-XXXXXXX-XXXXXX-XXXXXX</secret>
           <filter>[OSD]></filter>
           </GetCMDeviceCollections>
      </soap12:Body>  
</soap12:Envelope>

I try to filter something with square brackets and it is showing me everything... the request is not filtered... i also tried to use a CDATA element or some XML encoding... but this does not work either.

What is wrong?