WARNING: This page is about a different car, the 2013 BMW X5 M, 2012 BMW X5 M, 2011 BMW X5 M, and 2010 BMW X5 M. However, it is still accessible from the selected car via links, so may be relevant.
Necessary preliminary tasks
Open the floating headlining.
Raise slide/tilt sunroof.
Press water channel (1) upward at the marked points by pressing firmly with your thumb.