In Numbers 11, when the seventy elders appointed by God to assist Moses were officially installed, the Spirit of the LORD came upon them and they prophesied. However, two of the men who had remained in the camp but who didn't join with the others also prophesied.
Joshua apparently thought that the fact that they didn't come to the Tabernacle with the others was a threat to Moses' leadership and sought to restrain them. But Moses rebuked Joshua with the answer in verse 29.
I hope you have found this helpful.