We investigated the dc magnetic field and temperature dependences of the microwave surface resistance (Rs) of YBa2Cu3Oy (YBCO) superconducting thin films with various thicknesses. We used YBCO thin films with 300, 500, and 700nm deposited on a MgO (100) substrate by the thermal co-evaporation method. The Rs was measured using the dielectric resonator method at 21.8GHz, and a high dc magnetic field of up to 12T was applied parallel to the c-axis of the YBCO thin films during Rs measurements. The Rs value of YBCO thin films increased when dc magnetic field was applied. These relationships could be explained by using the two-fluid model for high frequency and low magnetic field limits. We defined the viscous drag coefficient η under the low magnetic limit and the high magnetic field limit as the ηlow (B, T, d) and ηhigh (B, T, d), respectively. The ηlow values were approximately two orders of magnitude greater than ηhigh values. Also, all ηlow and ηhigh value decreased or saturated as the temperature and film thickness increased. These results show that η under the low and high magnetic field limit depended on the temperature and film thickness.