My moonroof was starting to squeak when closed and I searched for a solution on the boards but couldn't find one. Here's what I tried anyway: with moonroof open, use some wax and polish the metal area where the roof meets the moonroof. This makes it smooth and less prone to squeaks.
It seems to work for now or at least until the wax wears off and then it's time to re-wax.
It seems to work for now or at least until the wax wears off and then it's time to re-wax.