We present a magnetic position sensor for scanning fiber endoscopes to address their inherent short-and long-term position instability, which is a major hurdle before their widespread clinical deployment. The position sensor uses a ring-shaped micromagnet at the tip of the fiber cantilever, producing a dynamic magnetic field as the scanner resonates. A miniaturized three-dimensional Hall sensor accommodated within the endoscopic probe housing measures the magnetic field vector, which is then mapped directly to the beam position using closed-form calibration curves empirically obtained through a one-time calibration step using a position sensitive detector. By integrating the sensor into an OCT-endomicroscope recently developed in our group, we demonstrate an average position resolution of 20 μm over a field-ofview of 2.1 mm field-of-view and distortion-free OCT images recorded with various scan parameters. We also discuss how sub-pixel (e.g., better than half the diffraction-limited spot size) position resolution can be attained with the new sensing scheme.