In tunnel junctions between ferromagnets and heavy elements with strong spin orbit coupling the magnetoresistance is often dominated by tunneling anisotropic magnetoresistance (TAMR). This makes conventional DC spin injection techniques impractical for determining the spin relaxation time ($tau_s$). Here, we show that this obstacle for measurements of $tau_s$ can be overcome by 2nd harmonic spin-injection-magnetoresistance (SIMR). In the 2nd harmonic signal the SIMR is comparable in magnitude to TAMR, thus enabling Hanle-induced SIMR as a powerful tool to directly determine $tau_s$. Using this approach we determined the spin relaxation time of Pt and Ta and their temperature dependences. The spin relaxation in Pt seems to be governed by Elliott-Yafet mechanism due to a constant resistivity $times$spin relaxation time product over a wide temperature range.