The consensus is that the authentic opinion is that all the Messengers were Prophets but not every Prophet was a Messenger. The first Messenger was Adam and the last Muhammad, peace be upon all of them.
Loo dhanyahay waa in ra'yiga dhab ah waa in dhammaan Rusushii ahaayeen Prophets laakiin ma Nabi kasta wuxuu ahaa Rasuul. Rasuulka kowaad wuxuu ahaa Adam iyo soo dhaafay Muxammed, nabad oo dhan oo iyaga ka mid korkiina ha ahaato.