The presence of an electron beam in a quasioptical gyrotron cavity alters the structure of the fields from that of the empty cavity. A computer code has been written that calculates this alteration for either an electron beam or a thin dielectric tube placed in the cavity. Experiments measuring the quality factor of such a cavity were performed for the case of a dielectric tube and the results agree with the predictions of the code. Simulations of the case of an electron beam indicate that self-consistent effects can be made small, in that almost all the power leaves the cavity in a symmetric Gaussian-like mode, provided the resonator parameters are chosen carefully.