We study the spin orbit coupled ultra cold Bose-Einstein condensate placed in a single mode Fabry-P\'erot cavity. The cavity introduces a quantum optical lattice potential which dynamically couples with the atomic degrees of freedom and realizes a generalized extended Bose Hubbard model whose zero temperature phase diagram can be controlled by tuning the cavity parameters. In the non-interacting limit, where the atom-atom interaction is set to zero, the resulting atomic dispersion shows interesting features such as bosonic analogue of Dirac points, cavity controlled Hofstadter spectrum which bears the hallmark of pseudo-spin-1/2 bosons in presence of Abelian and non-Abelian gauge field (the later due to spin-orbit coupling) in a cavity induced optical lattice potential. In the presence of atom-atom interaction, using a mapping to a generalized Bose Hubbard model of spin-orbit coupled bosons in classical optical lattice, we show that the system realizes a host of quantum magnetic phases whose magnetic order can be be detected from the cavity transmission. This provides an alternative approach for detecting quantum magnetism in ultra cold atoms. We discuss the effect of cavity induced optical bistability on this phases and their experimental consequences.