Are you working with a hosted feature service or a service that you've published to your own ArcGIS Server? If it's a hosted feature service, try the following; You'll have to be an administrator to do so.
My Organization > Edit Settings > Security > uncheck the box for "Allow only standard SQL queries."
Changing that setting would only apply if you were working with a hosted feature service, can I ask what version of ArcGIS Server you're using? Is it 10.2?