<apex:page >
<apex:includescript value="/soap/ajax/33.0/connection.js" />
<apex:includescript value="/soap/ajax/33.0/apex.js" />
<script>
try {
var query = "select collaborationGroupId, collaborationGroup.name from CollaborationGroupMember where memberid = '{!$User.ID}'"
//var query = "select id from account";
alert(query);
//sforce.connection.sessionId = "{!$Api.Session_ID}";
var records = sforce.connection.query(query);
console.log(records);
}
catch(e) {
alert(e);
}
</script>
</apex:page>
I recently encountered this error. Certain users could successfully query against ApexPage, while others received the "not supported" error. Enabling the "View Setup and Configuration" permission on the affected User's Profile would prevent this error, but there is obviously more to consider before regarding this as a solution.