We propose a diamond-based micron-scale sensor and perform high-resolution B-field imaging of the near-field distribution of coplanar waveguides. The sensor consists of diamond crystals attached to the tip of a tapered fiber with a physical size on the order of submicron. The amplitude of the B-field component B is obtained by measuring the Rabi oscillation frequency. The result of Rabi sequence is fitted with a decayed sinusoidal. We apply the modulation-locking technique that demonstrates the vector-resolved field mapping of the micromachine coplanar waveguide structure (CPW). B-field line scan was performed on the CPW with a scan step size of 1.25 μm. To demonstrate vector resolved rf field sensing, a full field line scan acts (was performed) along four NV axes at a height of 50 μm above the device surface. The simulations are compared with the experimental results by vector-resolved measurement. This technique allows the measurement of weak microwave signals with a minimum resolvable modulation depth of 20 ppm. The sensor will have great interest in micron-scale resolved microwave B-field measurements, such as electromagnetic compatibility testing of microwave integrated circuits and characterization of integrated microwave components.