The draw, which took place in Egypt on Tuesday, 19 May, saw South Africa pitted against co-hosts Kenya, Guinea and Eritrea in Group D.
The opening two rounds of qualifiers is set for the September/October FIFA international window, with matchdays three and four earmarked for November, before the campaign is concluded in March 2027.
The qualifiers, which feature 48 teams in total following the completion of the preliminary round, will narrow the teams down to just 24, with the top two in each group progressing to the final PAMOJA showpiece.
In instances where the co-hosts are drawn into a group, only the team will ranked highest outside of Kenya, Tanzania or Uganda will qualify for the final tournament.
CAF have earlier confirmed that the opening match of the tournament is scheduled for 19 June 2027, with the final inked in for 17 July 2027.
Full draw:
Group A: Morocco, Gabon, Niger, Lesotho
Group B: Egypt, Angola, Malawi, South Sudan
Group C: Côte d'Ivoire, Ghana, Gambia, Somalia
Group D: South Africa, Guinea, Kenya, Eritrea
Group E: DR Congo, Equatorial Guinea, Sierra Leone, Zimbabwe
Group F: Burkina Faso, Benin, Mauritania, Central African Republic
Group G: Cemroon, Comoros, Namibia, Congo
Group H: Tunisia, Uganda, Libya, Botswana
Group I: Algeria, Zambia, Togo, Burundi
Group J: Senegal, Mozambique, Sudan, Ethiopia
Group K: Mali, Cape Verde, Rwanda, Liberia
Group L: Nigeria, Madagascar, Tanzania, Guinea-Bissau