I just wanted to simplify a few points on this topic, but before I do, I am licensed as a mortgage loan originator only in the state of California. It is possible for those in all four citizenship classes below to obtain a mortgage here in the US, but there are specific guidelines for each --- the major ones I have tried to touch on here:
US Citizens: Limited only by qualification criteria (income, assets, credit and collateral). All programs, loan-to-values (LTVs) accessible.
Permanent resident aliens (green card): As with citizens, must have sufficient US history on credit qualifying characteristics but otherwise, terms very similar to US citizens.
Non-permanent resident aliens (work visa): With valid work visa, social security number and US tax and credit history, terms can be equivalent to above two classes. Without sufficient tax and credit history, mortgage financing still available but at more conservative LTVs (60% in most cases).
Foreign national: Does not have a US social security number and is a citizen of a foreign country. Financing available up to 60% of home's value --- must be a second or investment home and documentation can be provided from country of origin.
Here in CA, a niche that we see frequently and know very well is less than 20% down payment financing for non-permanent resident aliens (with tax and credit history). These individuals are even able to obtain jumbo loans with excellent terms, just as if they were a US citizen.
Let me know if I can be of service in any way.