The narration from at-Tabari's at-Tarikh
The narration of imam at-Tabari is narrated via (see here at the beginning of the long narration):
ابْنُ حميد Ibn Humayd -> سلمة الْأَبْرَشُ Salamah (al-Abrash) -> محمد بن إِسْحَاقَ Muhammad ibn Ishaaq -> يَزِيدَ بْنِ حَبِيبٍ Yazeed ibn Habeeb.
This narrator chain (isnaad) is Mursal as a Sahahbi was skipped. The chain from Yazeed up to ibn Humayd is connected!
Further ibn Humayd even if he is regarded as a hafidh is also known for his manakeer, imam a-Dhahabi when introducing him said (See -here in Arabic- in siyar 'alaam an-Nubala'):
Here and in the following I will translate from Arabic language as these translations are of my own take them carefully.
وَهُوَ مَعَ إِمَامَتِهِ مُنْكَرُ الْحَدِيثِ ، صَاحِبُ عَجَائِبَ .
Further imams such as an-Nasa-i and al-Bukhari didn't consider him as trustworthy. However imam Ahmad and ibn Ma'yn did. Also abu Zura'a ar-Razy and Muhammad ibn Muslim noted a lot of his narrations and then stopped narrating from him.
A-Dhahabi further quoted:
قَالَ أَبُو عَلِيٍّ النَّيْسَابُورِيُّ : قُلْتُ لِابْنِ خُزَيْمَةَ : لَوْ حَدَّثَ الْأُسْتَاذُ عَنْ مُحَمَّدِ بْنِ حُمَيْدٍ ; فَإِنَّ أَحْمَدَ بْنَ حَنْبَلٍ قَدْ أَحْسَنَ الثَّنَاءَ عَلَيْهِ . قَالَ : إِنَّهُ لَمْ يَعْرِفْهُ ، وَلَوْ عَرَفَهُ كَمَا عَرَفْنَاهُ ، لَمَا أَثْنَى عَلَيْهِ أَصْلًا .
Abu Ali al-Nisaburi said: I asked to ibn Khuzaymah: If the teacher (meaning ibn Khuzaymah) would narrate on the authority of Muhammad bin Hamid, as Ahmed bin Hanbal mentioned him with the best praise. He responded: He did not know him, and had he known him as we knew him, he would not have praised him in the first place
And he also mentioned that ibn Jarir (meaning imam at-Tabari has narrated a lot on his authority).
So far I've only mentioned ibn Humayd, ibn Salamah al-Abrash isn't qualified any better: imam an-Nasa-i regarded him as da'if, al-Bukhari said he had some rejected narrations, abu Hatim ar-Razi considered him da'if too. A-Dhahabi said he was strong in the topic of al-Maghazi.
Ibn Ishaaq is the known author of al-Maghazi which was compiled in Sirat ibn Hishaam and he is widely accepted as a narrator. However in many cases his narrations require a backup by more trustworthy narrators.
Yazeed ibn Habeeb was born during the reign of Mu'awiyah and the only Sahabi that a-Dhahabi confirmed his narration from was 'Abdullah ibn al-Harith ibn Juz' az-Zubaydi عبد الله بن الحارث بن جزء الزبيدي however he met many greater tabi'yn like Nafi'.
On the whole the hadith has several issues and therefore the narrator chain is rather doubtful!
Other similar narration
However there are other narrations:
In ibn Sa'ad's at-Tabaqaat al-Kubra (ص347 - كتاب الطبقات الكبرى ط العلمية):
أَخْبَرَنَا سَعِيدُ بْنُ مَنْصُورٍ. أَخْبَرَنَا سُفْيَانُ عَنْ عَبْدِ الْمَجِيدِ بن سهل عن عبيد الله ابن عَبْدِ اللَّهِ قَالَ: جَاءَ مَجُوسِيٌّ إِلَى رَسُولِ اللَّهِ - صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ - قَدْ أَعْفَى شَارِبَهُ وَأَحْفَى لِحْيَتَهُ فَقَالَ: مَنْ أَمَرَكَ بِهَذَا؟ قَالَ: رَبِّي. قَالَ: لَكِنَّ رَبِّي أَمَرَنِي أَنْ أُحْفِيَ شَارِبِي وَأُعْفِيَ لِحْيَتِي .
We were informed by Said ibn Mansur from Sufyan from Abdul-Majeed ibn Sahl from 'Ubayd Allah ibn 'Abdillah who said:
a Zoroastrian came to the Messenger of Allah - Allah's prayers and blessings be upon him - and had released his mustache and trimmed his beard, and hes () said to him: Who ordered you this? He said: My Lord. He said: But my Lord has commanded me to trim my mustache and leave my beard.
This isnaad is also mursal as the Sahabi was not mentioned. 'Ubayd Allah ibn 'Abdillah ibn 'Utbah met a lot of Sahabah among them 'Aishah, ibn 'Umar, ibn 'Abbas, abu Sa'id al-Khudry and abu Hurrairah. This chain is counting only trustworthy narrators and is therefore more autentic than that of ibn Jarir at-Tabari. Note that this narration only quotes on Zoroastrian not two!
Abu Bakr ibn abi Shaybah (the teacher of al-Bukhari and Muslim) compiled a further narration in his al-Mussannaf مصنف ابن أبي شيبة:
36626 - مُحَمَّدُ بْنُ فُضَيْلٍ , عَنْ حُصَيْنٍ , عَنْ عَبْدِ اللَّهِ بْنِ شَدَّادٍ , قَالَ: كَتَبَ كِسْرَى إِلَى بَاذَامَ: أَنِّي نُبِّئْتُ أَنَّ رَجُلًا يَقُولُ شَيْئًا لَا أَدْرِي مَا هُوَ , فَأَرْسِلْ إِلَيْهِ فَلْيَقْعُدْ فِي بَيْتِهِ وَلَا يَكُنْ مِنَ النَّاسِ فِي شَيْءٍ وَإِلَّا فَلْيُوَاعِدْنِي مَوْعِدًا أَلْقَاهُ بِهِ , قَالَ: فَأَرْسَلَ بَاذَامُ إِلَى رَسُولِ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ رَجُلَيْنِ حَالِقِي لِحَاهُمَا مُرْسِلِي شَوَارِبِهِمَا , فَقَالَ رَسُولُ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: " مَا يَحْمِلُكُمَا عَلَى هَذَا؟ قَالَ: فَقَالَا لَهُ: يَأْمُرُنَا بِهِ الَّذِي يَزْعُمُونَ أَنَّهُ رَبُّهُمْ , قَالَ: فَقَالَ رَسُولُ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: "لَكِنَّا نُخَالِفُ سُنَّتَكُمْ , نَجُزُّ هَذَا وَنُرْسِلُ هَذَا
Mohammad bin Fudayl from Hosayn from 'Abdullah bin Shaddad, said:
Khosrow wrote to Baadham: I was informed that a man says something I do not know what it is. So sent him (a message) and order him to stay in his house, and not be among the people in anything, otherwise let him date me with a date that I can meet him. He said: then Baadham sent to the Messenger of Allah Allah's prayers and blessings be upon him, two men who have shaved their beards and left their moustaches. Messenger of Allah Allah's prayers and blessings be upon him asked them: What made you do this? They said to him, we are commanded to do so by the one they claim is their Lord, He said: The Messenger of Allah Allah's prayers and blessings be upon him said then: (we would disagree with your custom, we will trim this and leave growing that).
This is also regarded as mursal and the narrator chain is also of a high degree of trust. here again the speech is about two Zoroastrians not one as in at-Tabaqaat al-Kubra of ibn Sa'ad. 'Abdullah bin Shaddad met many sahabah among them 'Umar, 'Ali, Mu'ad ibn Jabal, ibn Mas'ud and the mother of believers Maymunah who was his maternal aunt.
There are many more narrations confirming this. See also fatwa islamqa #218487 -in Arabic- were many other related ahadith are mentioned and qualified roughly.