Tau stunned Libya with a 49th minute strike and then grabbed the winner in the 68th minute, three minutes after Ahmad Ben Ali had equalised with a penalty.
South Africa will now wait for the draw that is set to take place on April 12 in Cairo to hear who their opponents will be in the June tournament.
After the final whistle, coach Stuart Baxter led the dressing room celebrations with a victory song.
Watch Baxter and Bafana sign after the final whistle:
For more news your way, download The Citizen’s app for iOS and Android.
Download our app and read this and other great stories on the move. Available for Android and iOS.