MB 4: One should not - Rabbi Chaim Vital [renowned Kabbalist, late 16th cent.-early 17th cent.] writes in the name of the Ari [Rabbi Yitzchak Luria, Rabbi Chaim's teacher, mid-16th cent.] that he [the Ari] did not say any liturgical poems (Piyutim) or liturgical songs (Pizmonim) except those written by the early composers, such as the Kaliri [Rabbi Elazar haKalir, the most renowned and perhaps the most prolific of Piyutim and Pizmonim composers], which were composed with absolute correctness and understanding. He would also not say the poem Yigdal [a standard (but optional) part of our morning liturgy. -LC] Nevertheless, Rabbi Chaim Vital's son testified that when his father served as communal prayer leader for the High Holy Days, he would say all of the confessions and Piyutim. Listen to the wise man, and from him you will derive wisdom and moral guidance, and a practical lesson not to alter established customs. [My understanding is that this refers to Rabbi Chaim Vital, who did not change the custom even though his great teacher, the Ari, did so. --YM]
In the Shibolei Leket [a collection of responsa by early authorities, by Rabbi Tzidkiyahu ben Avraham Anav, 13th cent.], the author writes in the name of the Ge'onim [great Jewish legal authorities after the Talmudic period and before the early authorities (Rishonim), approx. 8th - 10th cents. -LC] that it is a commandment to say Piyutim. However, [in contrast to the differing opinions regarding the saying of Piyutim], with regard to practices concerning the basic prayers, all authorities agree that no one may deviate from his local community customs. For example, one may not change from the Ashkenazic traditional wording to the Sephardic traditional wording or vice versa. [The traditions differ somewhat between communities whose European roots are in Germany (Ashkenaz) and those from Spain (Sepharad). -LC] Nevertheless, Ashkenazic Jews who pray with a Sephardic congregation or the reverse [both common occurrences these days -LC] fulfill their obligation for prayer. All of the above (regarding local community customs) concerns only those practices relating to the basic prayers. However, concerning those words mentioned in the Talmud or those words of the universally recognized legal authorities that were derived from the Talmud, those are binding on all Jews, and no individual [or community -LC] has the authority to follow his practice where it conflicts with those words. [The Babylonian Talmud, regarded as the most definitive source of the Oral Law (given to Moses on Mount Sinai along with the Written Law - the Torah, and which is essential to understanding the laws of the Torah), is the preeminent source of and last word in Jewish law. -LC]
MB 5: From the congregation - See in the Magen Avraham that on Passover, when the communal prayer leaders (in those congregations that recite the special Piyut for the holiday) draw out their tunes considerably, it is better to say the Piyut prior to beginning the blessing "Yotzer Or" [the first blessing before the morning Shema]. This is because most of the content of the Piyut deviates from the subject of the blessing, and is therefore regarded as an interruption if one spends as much time with the Piyut as it would take to recite the entire blessing. Therefore, at least ideally it is proper to say the Piyut prior to the blessing (as in Siman 65, MB 4 above, see there). If one forgot to say the Piyut and remembered only after completing the blessing, he is forbidden to go back and say it, since saying the Piyut is no more obligatory than saying the prayer "Al haNisim" ("for the miracles") on Chanukah and Purim. [This is a special addition to the Silent Prayer and the Grace After Meals on holidays of Chanukah and Purim, and the rule is that if one forgot to insert it one does not go back to say it. -LC]
MB 6: With the congregation - An individual praying on his own should not say any Piyut in the middle of a blessing [later authorities (Achronim), who date from the time of the Shulchan Aruch (mid-16th cent.) to the present time]. As a side point, I felt it worthwhile to mention here the incorrect practice of many unlearned people, who err on Rosh HaShana and Yom Kippur when the Chazan sings an extended Piyut at the beginning of the blessing "Yotzer Or" [the first blessing before the morning Shema]. They begin their blessing from the Chazan's conclusion, rather than starting at the beginning of the blessing - and it is worthwhile to caution them about this.
_______________