Yep, that happened to me the first time I even got into my car. I tried to open the sunroof only to hear a horrible cracking noise. I flipped, thinking that I had just broken my brand-new car. Turns out this is a common issue. It can be DIY'd, but there are so many small parts and delicate things involved in the sunroof that it seems a bit daunting to me.
I got quoted about $230 to get it all fixed up. I think it is worth having the piece-of-mind.