The variables:
Height of the sun above the horizon. The closer the sun is to the horizon, the more atmosphere it has passed through before you see it. The atmosphere reflects, absorbs, and dissipates this energy so that less of it reaches a viewing location on the ground.
The optical density of the atmosphere. Clear dry air allows much more of the sun's energy to reach the surface than air thick with water vapor and other particulates in it. On heavily overcast days the position of the sun can not be seen at all from the surface. Most days at most places are somewhere in between these two extremes.
Lens focal length/magnifying power/maximum aperture. The size of a lens' entrance pupil (effective aperture) determines how much of the sun's energy is collected by the lens. The larger the entrance pupil, the more energy is collected when all of the other variables are constant.
The length of time the lens collects the sun's energy. The longer a lens is pointed at the sun the more energy it collects. Heat that is collected faster than it can be dissipated raises the internal temperature of the camera. If the components get too hot, they can be damaged.
The same is true of the human retina, which is generally less tolerant of direct exposure to the sun's energy than most modern cameras. Heat that is pumped into an eye faster than the body can dissipate it can "cook" the rods and cones in the retina, leading to permanently impaired visual function or even total blindness. Since the retina has no pain receptors, you won't even feel it as the infrared energy from the sun heats your retinal tissue. The effect of the damage from that heat can take up to several hours, so by the time you realize you have a problem it is far too late to do anything about it.
Due to the large number of variables and the wide range of variability for each of them there is no single focal length that one can say definitively is the line of demarcation between 'safe' and 'unsafe.' On a totally overcast day it might be possible to point an 800mm f/5.6 lens directly at the sun for an extended time with no ill effects. On a bright, cloudless day in a high desert, it might not be safe to point a very wide angle lens at the sun for much more than a second or two. Maybe even less.
I've never seen an official statement by a camera manufacturer that says it is safe to point a camera to the sun at all without proper filtration that absorbs not only about 15 stops of visible light, but has the same attenuation for the sun's infrared and UV output. On the other hand, they all pretty much universally warn against looking directly at the sun in the viewfinder at any time with any lens.I've never seen an official statement by a camera manufacturer that says it is safe to point a camera to the sun at all without proper filtration that absorbs not only about 15 stops of visible light, but has the same attenuation for the sun's infrared and UV output. On the other hand, they all pretty much universally warn against looking directly at the sun in the viewfinder at any time with any lens.