Horayos3: 3
חָטְאוּ עַד שֶׁלֹּא נִתְמַנּוּ וְאַחַר כָּךְ נִתְמַנּוּ — הֲרֵי אֵלּוּ כַהֶדְיוֹט. רַבִּי שִׁמְעוֹן אוֹמֵר: אִם נוֹדַע לָהֶם עַד שֶׁלֹּא נִתְמַנּוּ — חַיָּבִין, וּמִשֶּׁנִּתְמַנּוּ — פְּטוּרִין.  וְאֵיזֶהוּ הַנָּשִׂיא? זֶה הַמֶּלֶךְ, שֶׁנֶּאֱמַר: ”וְעָשָׂה אַחַת מִכָּל־מִצְוֹת ה› אֱלֹהָיו”, [נָשִׂיא] שֶׁאֵין עַל גַּבָּיו אֶלָּא ה› אֱלֹהָיו.
[If] they sinned before they were appointed, and were then appointed —- they are like the commoner. R’ Shimon says: If it became known to them before they were appointed, they are liable; after they were appointed, they are exempt.  Who is the Nasi? This is the king, as it says: and he will do one of the commands of Hashem his God —- [i.e.,] a Nasi who has none above him but Hashem his God.