Can one include a non shomer shabbos person as one of the 10 in a minyan? What if the minyan does not know if he’s shomer shabbos or not?
Answer:
Somebody who desecrates the Shabbos publicly cannot join to form a minyan. However, under extenuating circumstaces he can join.
If the minyan does not know, the person can join the minyan, for there is no reason to assume that a person publicly desecrates the Shabbos.
Sources:
The Mishnah Berurah (55:46) writes (citing from Peri Megadim) that somebody who publicly desecrates the Shabbos cannot join in forming a minyan. However, poskim write that under extenuating circumstances one can be lenient, assuming that the person is not responsible for his spiritual condition (tinok she-nishba).
See Mevakshei Torah (Sivan 5755, no. 163), citing from Rabbi Shlomo Zalman Auerbach, who writes that one can be lenient where there is a need, and who also stresses that one must be careful not to distance them.
See also Iggros Moshe (Orach Chaim 1:23; 2:19) who writes that they can join for reciting Kaddish and Kedushah, but not for the special virtue of tefillah be-tzibbur. See also Minchas Yitzchak 3:26.