For graphs G and H, let G {\displaystyle\smash{\begin{subarray}{c} \hbox{\tiny\rm rb} \\ \longrightarrow \\ \hbox{\tiny\rm p} \end{subarray}}}H denote the property that for every proper edge-colouring of G there is a rainbow H in G. It is known that, for every graph H, an asymptotic upper bound for the threshold function pHrb=pHrb(n) of this property for the random graph G(n,p) is n−1/m(2)(H), where m(2)(H) denotes the so-called maximum 2-density of H. Extending a result of Nenadov, Person, Škorić, and Steger [J. Combin. Theory Ser. B 124 (2017),1-38] we prove a matching lower bound for pKkrb for k≥5. Furthermore, we show that pK4rb=n−7/15.