Task space trajectory tracking for quadruped robots plays a crucial role on achieving dexterous maneuvers in unstructured environments. To fulfill the control objective, the robot should apply forces through the contact of the legs with the supporting surface, while maintaining its stability and controllability. In order to ensure the operation of the robot under these conditions, one has to account for the possibility of unstable contact of the legs that arises when the robot operates on partially or globally slippery terrains. In this work, we propose an adaptive trajectory tracking controller for quadruped robots, which involves two prioritized layers of adaptation for avoiding possible slippage of one or multiple legs. The adaptive framework is evaluated through simulations and validated through experiments.