Sahih Muslim #1785 c
The Book of Jihad and Expeditions 32:117
The same tradition has been narrated through a different chain of transmitters on the authority of A'mash. This version contains the words:
Ila amrin yofzi'una instead of Ila amrin na'rifuhu.