We've had this problem on our car, and have seen it on 4 or 5 dealer loaner vehicles we've driven.
It seems to be related to heat... when the car is out on a hot, sunny day, it doesn't want to open. My guess is that something in the frame of the sunroof is swelling just enough to cause the "anti-pinch" sensors to stop it from moving.
We found that a bit of downward pressure on the front edge while trying to open it (or upward pressure on the rear edge from inside) will give it enough "assist" that it will open. But so far BMW Canada has not noted it as an issue.
If you have problems with your sunroof, please get it noted by your dealer, so BMW can start working on a fix!