title: Azure IoT Central - Query for device group failing on creation
body: <p>I'm trying to create device groups to eventually create a Job with this particular device group to send a reboot command to all the devices in it. I'm using the IoT Central API REST for this with the URL looking like this (which is how it is on their <a href="https://docs.microsoft.com/en-us/rest/api/iotcentral/2022-07-31dataplane/device-groups/create?tabs=HTTP" rel="nofollow noreferrer">documentation</a>): <code>PUT https://{subdomain}.{baseDomain}/api/deviceGroups/{uuidCreatedByMe}?api-version=2022-07-31</code></p>
  <p>The body on the request looks something like this:</p>
  <pre><code>{
      description: `Pulses' group to be rebooted, created at ${DateTime.now().toISO()}`,
      displayName: `Reboot group ${deviceGroupId}`,
      filter: query,
  }
  </code></pre>
  <p>And the query is very similar to this</p>
  <pre><code>SELECT * FROM devices WHERE $template = &quot;templateId&quot; AND $id IN [&quot;deviceId1&quot;, &quot;deviceId2&quot;]
  </code></pre>
  <p>But for some reason, when I send the request, it responds with an error:</p>
  <pre><code>Request failed with status 500 and error: {
     &quot;code&quot;: &quot;InternalServerError&quot;,
     &quot;message&quot;: &quot;Something went wrong on our end. Please try again. You can contact support at https://aka.ms/iotcentral-support. Please include the following information. Request ID: requestId, Time: Tue, 06 Sep 2015 477:10:01 GMT.&quot;,
     &quot;requestId&quot;: &quot;requestId&quot;,
     &quot;time&quot;: &quot;Tue, 06 Sep 2022 16:10:01 GMT&quot;
  }
  </code></pre>
  <p>However, when I try to create a Job and get the list of device groups, this brings me all the device groups I have been attempting to create, but it doesn't let me see the number of devices and doesn't allow me to continue creating the Job. And then, I request through the REST API to delete such device group with one of the ids, and it deletes it just fine.</p>
  <p>My question would be...</p>
  <p>Is this related to the query or what exactly?...</p>
  <p>Because <a href="https://docs.microsoft.com/en-us/azure/iot-central/core/howto-query-with-rest-api#value-comparisons" rel="nofollow noreferrer">according to their documentation this is a valid query</a></p>