Do you mean the seal that runs down the roof next to the roof rails?
https://www.realoem.com/bmw/enUS/sho...diagId=51_4113
They press in, if I recall correctly (definitely no adhesive used). Very easy to take on and off but be careful not to tear the attachment points which I seem to remember are just rubber eyelets and buttons molded into the seal and which fit over/into matching pieces on the roof and door pillars. I took mine off to paint the roof and hood and they were filthy. 23 years of dirt and grime caked into the voids. Perhaps that person's were damaged and the attachment points broke, but I will say mine were in great shape and cleaned up nicely so I think they are pretty resilient...considering how terrible the rest of the rubber and plastic on my X5 was before I started really working on it.