Check this thread: ERROR(500): Error executing function 'RunQuery': The current user does not have the required roles for this operation