If you are a medical marijuana patient, you could assert that as a defense to the charge of possession of marijuana.The facts of the case are also relevant.  For example, if you purchased marijuana from an approved dispensary as a medical marijuana patient, that would be a strong argument in your favor; however, if you were caught in an undercover drug bust buying from a pusher on the street, then your defense most likely would not prevail.