Common envelope (CE) is an important phase in the evolution of many binary systems. Giant star / compact object interaction in binaries plays an important role in highenergy phenomena as well as in the evolution of their environment. Material accreted onto the compact object may form a disk and power a jet. We study analytically and through numerical simulations the interaction between the jet and the CE. We determine the conditions under which accreting material quenches the jet or allows it to propagate successfully, in which case even the envelope may be ejected. Close to the stellar core of the companion the compact object accretes at a larger rate. A jet launched from this region needs a larger accretion-to-ejection efficiency to successfully propagate through the CE compared to a jet launched far from the stellar core, and is strongly deflected by the orbital motion. The energy deposited by the jet may be larger than the binding energy of the envelope. The jet can, thus, play a fundamental role in the CE evolution. We find that the energy dissipation of the jet into the CE may stop accretion onto the disk. We expect the jet to be intermittent, unless the energy deposited is large enough to lead to the unbinding of the outer layers of the CE. Given that the energy and duration of the jet are similar to those of ultra-long GRBs, we suggest this as a new channel to produce these events.