As far as I know, glass blocks UV light, which is cancerous.
Do we generate vitamin D behind a glass window, if we sit in the sun?
Medical Sciences Stack Exchange is a question and answer site for professionals in medical and allied health fields, students of those professions, related academics, and others with a sound understanding of medicine and healthcare-related sciences. It only takes a minute to sign up.Sign up to join this community
Short answer: No.
Longer answer: UVB rays are essential for Vitamin D synthesis. According to some studies, 1 hour of sunshine is needed even in sunny climates - but only in average, still depending on latitude, skin color and other factors - to prevent Vitamin D deficiency. Still, even the average sun exposure in mid-latitude regions summers might not fulfill your body's needs for UV radation to supply itself with Vitamin D, but opinions on this differ (as can be seen in comparison with the first link of this paragraph).
But when comparing it to 1 hour of full sun exposure in mild climates, it is safe to conclude that the UVB levels behind glass windows, as measured in the first overall link above, are so low that it is highly improbable to reach sufficient Vitamin D levels behind them.