SCOTTSDALE, Ariz. — Soon after health officials announced they would dole out Arizona’s first licenses for medical marijuana dispensaries, Ryan Hurley, co-chairman of the medical marijuana practice at the Rose Law Group here, noticed a common trait among some of the people most eager to enlist his services: They were already in the business in other states.

There was a family who owns dispensaries in Washington State. There was an investor from Los Angeles who has a stake in several California dispensaries. There was a disabled Navy veteran who makes a living running a medical marijuana delivery service in San Diego.

Arizona has one of the country’s strictest set of requirements governing the sale of medical marijuana — and, Mr. Hurley said, they were all looking to tap into its market because of that.

“There’s a sense of legitimacy that comes from having so many rules,” he said.

Medical marijuana programs exist in a gray area. They are legal in 17 states and the District of Columbia, but illegal under federal law, where selling and consuming marijuana, even if for therapeutic purposes, is still a crime. It is a risky undertaking: In California, where rules governing the business are particularly lax, medical marijuana ventures have been targets of raids.