I'm not sure. I know there are some different kinds of vitamin D. What I recall hearing is the kind you get from sunlight, you can take higher doses of, whereas the kind added to milk and vitamins can be toxic at high enough levels. So, it's better if you can get the sunlight kind, if you can find enough sunlight- a constant challenge around here.
Yhe problem with depending on sunlight is that the UVB rays you need only get through if the sun is about 30 degrees from the zenith, the highest point in the sky.
Most parts of America only have these conditions for 2 or 3 months a year.
You can go out during a clear winter day and get burned to a crisp, but your body won't make much Vit D at all.