The answer is likely no, although it is hard to prove a negative. In June 1940, the German Naval Staff (SKL) proposed basing U-boats in Dakar because of the concentration of shipping along the Atlantic coast of Africa bound from the Indian Ocean or South America to Britain (see page 12 of this book complied by the British in 1946 covering U-boat policy). So certainly the desire to use Dakar was there, and several Vichy submarines were based at Dakar, although they saw limited use.
I am not able to find a single patrol that started or began at Dakar, including those of the U-105 and U-403, which were sunk very close to the port (using uboat.net as a resource, which has comprehensive data on this subject). This does not necessarily preclude Dakar as a refueling stop during a patrol, like the U-96's covert refueling in Vigo, Spain. However, I cannot find a single reference to a U-boat pulling into Dakar on uboatarchive.net. Of course, this does not definitively rule out the possibility, as that website does not have every U-boat log digitized. But I also have not been able to find any reference to refueling at Dakar in any of my U-boat reference books. There are numerous references to U-boats patrolling in the vicinity of Dakar, but this appears to be due to the concentration of shipping of West Africa, as noted above.
In terms of Djibouti and French Somaliland, I have been unable to find references. U-boats operating in the Indian Ocean were either based in France or in Penang, Malaya along with Japanese submarines (see Hitler's Gray Wolves by Lawrence Patterson). All U-boats operating in this theater were the larger Type IXC or IXD2 U-boats, which had longer range than the more common Type VIIC, and thus had no need for Djibouti as a base.