The color coding you are using is correct. The 12V supply (Green /Brown) is switched on and off by the car access system. As soon as you unlock the door it switches on and it stays active for a while after you lock it. Have a look at this:
https://www.newtis.info/tisv2/a/en/f06-650i-cou/s4MNsTV
Connector A60*1B pin 3 for 12V and pin 10 for ground.