A high-quality factor microwave resonator in the presence of a strong magnetic field could have a wide range of applications, such as axion dark matter searches where the two aspects must coexist to enhance the experimental sensitivity. We introduce a polygon-shaped cavity design with bi-axially textured YBa$_{2}$Cu$_{3}$O$_{7-x}$ superconducting tapes covering the entire inner wall. Using a 12-sided polygon cavity, we obtain substantially improved quality factors of the TM$_{010}$ mode at 6.9 GHz at 4 K with respect to a copper cavity and observe no considerable degradation in the presence of magnetic fields up to 8 T. This corresponds to the first demonstration of practical applications of superconducting radio frequency technology for axion and other research areas requiring low loss in a strong magnetic field. We address the importance of the successful demonstration and discuss further improvements.