how long do you have to be married to get residency?
Because marriage is a relatively easy route to permanent residence, USCIS grants conditional permanent residence for two years. After two years, you will need to file Form I-751 to remove the conditions of residence and to get a permanent green card.