Former Arsenal and Chelsea striker Olivier Giroud is just five goals away from surpassing Thierry Henry's all-time record for France after scoring in the win over the Ivory Coast.
Giroud, 35, headed in from AC Milan team-mate Theo Hernandez's cross to take his tally to 47 for the world champions in Marseille.
Henry netted 51 times for Les Bleus.
Gunners forward Nicolas Pepe scored the opener for the African side, but Aurelien Tchouameni won it late on.
Monaco midfielder Tchouameni rose highest to power home a header from Matteo Guendouzi's corner in the 93rd minute.
Giroud's goal, meanwhile, was also the 19th consecutive game in which France had scored, netting 42 times in the process.
Didier Deschamps' men host South Africa in a friendly on Tuesday, while Ivory Coast, who have failed to qualify for the 2022 World Cup, travel to play England at Wembley on the same day.