Whistler waves are often observed in magnetopause reconnection associated with electron beams. We analyze seven MMS crossings surrounding the electron diffusion region (EDR) to study the role of electron beams in whistler excitation. Waves have two major types: (1) Narrow-band waves with high ellipticities and (2) broad-band waves that are more electrostatic with significant variations in ellipticities and wave normal angles. While both types of waves are associated with electron beams, the key difference is the anisotropy of the background population, with perpendicular and parallel anisotropies, respectively. The linear instability analysis suggests that the first type of wave is mainly due to the background anisotropy, with the beam contributing additional cyclotron resonance to enhance the wave growth. The second type of distribution excites broadband waves via Landau resonance, and as seen in one event, the beam anisotropy induces an additional cyclotron mode. The results are supported by particle-in-cell simulations. We infer that the first type occurs downstream of the central EDR, where background electrons experience Betatron acceleration to form the perpendicular anisotropy; the second type occurs in the central EDR of guide field reconnection. A parametric study is conducted with linear instability analysis. A beam anisotropy alone of above ~3 likely excites the cyclotron mode waves. Large beam drifts cause Doppler shifts and may lead to left-hand polarizations in the ion frame. Future studies are needed to determine whether the observation covers a broader parameter regime and to understand the competition between whistler and other instabilities.