It is said to be a Hadith Qudsy

Q 7: Would you please clarify for us how the difference of opinion among the Imams (initiators of Schools of Jurisprudence) can be a mercy?

A: It was narrated from Ibn ‘Abbas (may Allah be pleased with him) that the Prophet (peace be upon him) said, “Whatever is given to you of the Book of Allah, acting upon it is a must. No one has an excuse for abandoning it…” until the part in which he stated: “Difference of opinion among my Sahabah (Companions) is a mercy to you.” Narrated by Al-Bayhaqy in "Al-Madkhal" with a disconnected Sanad (chain of narrators). It was also related by Al-Tabarany and Al-Daylamy, and there is some weakness in it, in books such as "Kashf Al-Khafa'". Thus, it is clear that this Hadith is not Sahih (authentic). Allah (Exalted be He) says (what means): ...but they will not cease to disagree. Except him on whom your Lord has bestowed His Mercy (the follower of truth (Surah Hud, 11: 118-119).May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.