I want to search a specific enrollment device on DPS (based on its 'OL' tag). For that, I use the next piece of code:
QuerySpecification querySpecification = new QuerySpecificationBuilder("*",QuerySpecificationBuilder.FromType.ENROLLMENTS)
.where("initialTwin.tags.OL='12345678ABCD'")
.createSqlQuery();
Query query = provisioningServiceClient.createIndividualEnrollmentQuery(querySpecification);
But, when I execute query.next() to fetch the results, always is returning all the devices in the DPS.
I've also tried to use the deviceId in the "where" clause but it returns all devices too.
What I'm doing wrong?