Both exist, although the classical literature focuses on anaerobic "exo-electrogenic" microbes. Put in simple words:
1) Instead of adding oxygen, they oxidize organic matter by removing electrons and protons, that is: hydrogen.
2) The removed electron is transferred to an anode (by different biochemical mechanisms), while the proton is simply ejected to the growth medium.
3) The electron is led to the cathode by an external circuit, the proton diffuses to this same cathode in the media, through a proton exchange membrane (so that it cannot swim back). At the cathode, they unite with oxygen to form water.