Negative commandment · Lo Ta’aseh #74 of 613
For a non-priest not to serve in the Temple
שלא יעבוד הזר במקדש
The verse · Bamidbar 18:4
וְנִלְווּ עָלֶיךָ וְשָׁמְרוּ אֶת־מִשְׁמֶרֶת אֹהֶל מוֹעֵד לְכֹל עֲבֹדַת הָאֹהֶל וְזָר לֹא־יִקְרַב אֲלֵיכֶם
“And they shall be joined to thee, and keep the charge of the Tent of Meeting, for all the service of the tent, and a stranger shall not come near to you.”
The Rambam’s words
For a non-priest not to serve in the Temple, as [Numbers 18:4] states: "An unauthorized person shall not approach them."
שלא יעבוד הזר במקדש, שנאמר "וְזָר לֹא יִקְרַב אֲלֵיכֶם" (במדבר יח, ד).
Why · Sefer HaChinuch #390
That a foreigner not serve in the Temple
“It is from the roots of the roots of the commandment [that it is] because it is the glory of the King and the place that there be specific people from a specific tribe, that are affixed to His service, and that foreigners not come to serve.”
Who & when
“And this prohibition is practiced by males and females at the time of the [Temple]; and even at this time, even though it is desolate, on account of our iniquities.”
Where in the Mishneh Torah
Hilchot Admission into the Sanctuary הלכות ביאת מקדש