A high Q-factor microwave resonator in a high magnetic field could be of great use in a wide range of applications, from accelerator design to axion dark matter research. The natural choice of material for the superconducting cavity to be placed in a high field is a high temperature superconductor (HTS) with high critical field (>100 T) and high depinning frequency (>10 GHz). The deposition, however, of a high-quality, grain-aligned HTS film on a three-dimensional surface is technically challenging. As a technical solution, we introduce a polygon-shaped resonant cavity with commercial YBa2Cu3O7−x (YBCO) tapes covering the entire inner wall. We then measured the Q-factor at 4 K at 6.93 GHz as a function of an external DC magnetic field. We demonstrated that the maximum Q-factor of the superconducting YBCO cavity was about 6 times higher than that of a copper cavity and showed no significant degradation up to 8 T. This is the first indication of the possible applications of HTS technology to the research areas requiring low loss in a strong magnetic field at high radio frequencies.