I have had this happen with two different 02 Pathfinders. In either front corner of the sunroof frame (black plastic area) there is a drain hole that connects (without a clamp) to a very flexible, translucent, somewhat large in diameter, drain hose that travels down the pillar to the undercarriage.
Most likely you can snake a wire in the drain hole to free the obstruction. At dealerships they blow in compressed air. I used a ground wire from a 12-2 electrical cable. I have heard of people using the line from a weed wacker.
If you pull the rubber trim from the door molding at the top and water is running under the headliner the drain hose has disconnected from the black plastic drain opening in the sunroof frame. I had to fish it out of the roof pillar with a hook made from a piece of wire to reconnect it. It's not as bad as it sounds, but you must pull off the clipped on pillar plastic with the speaker grill and remove the visor with a phillips screwdriver. On the left side there is a plastic cover over the screws. Once the visor is down you can bend the headliner down enough to see what is going on.
One note. When you pour in a little water to see if it is running under the headliner make certain that the water goes in the very outside track or the black front portion of the sunroof frame, otherwise it will flow to areas that will direct the water to go under the headliner and not to the drain hole.
