Welcome to the club. Your Oil Thermostat Gasket is leaking. They go bad on all N62 engines (what you have). I just did the repair over the weekend. It's a $6 part that the dealer will charge you about $800 because of all the labor involved.
See this thread
https://xoutpost.com/bmw-sav-forums/...k-2007-x5.html
I detailed out the steps (at the end of the thread) if you want to attempt it yourself.