According to Article 97 of the United Nations Charter, "The Secretary-General shall be appointed by the General Assembly upon the recommendation of the Security Council." Therefore, the General Assembly is the body that formally appoints the Secretary-General, based on a candidate recommended by the Security Council.