Originally Posted by
Row3Acer
You get bonus miles offered whether you purchase tickets under codeshare or not. These rules are shown in MP+ programs. They all depend on your ticketing class.
If one buys code-share UA flight, but actual flight is operated by OZ (for example), (s)he does not earn bonus miles.