Someone asked, "Did you witness two Eids fall on the same day with the Messenger of Allah ﷺ?"He replied, "Yes."The questioner asked, "What did he do?"He answered, "He prayed the Eid prayer, then gave a concession regarding the Friday prayer and said, 'Whoever wishes to pray it, let him pray.'"
حدثنا محمد بن كثير أخبرنا إسرائيل حدثنا عثمان بن المغيرة عن إياس بن أبي رملة الشامي قال شهدت معاوية بن أبي سفيان وهو يسأل
أشهدت مع رسول الله ﷺ عيدين اجتمعا في يوم قال نعم قال فكيف صنع قال صلى العيد ثم رخص في الجمعة فقال من شاء أن يصلي فليصل
[Its isnad is hasan] Nasai transmitted it in the Book of the Two Eids, chapter on the concession granted to one who attended the Eid prayer, no. 1592, and Ibn Majah, no. 1310, from the hadith of Israil, with this same wording. Ibn Khuzayma graded it sahih, no. 1464, as did Hakim, 1/288, and Dhahabi concurred with him.