Which branch does the executive branch have to get an approval from when appointing heads of executive departments ambassadors and federal court judges?

The U.S. Senate must confirm such appointments.