In June, Microsoft became the first tech giant to take the leap into legal weed.

The 41-year-old company, based in the pot-friendly city of Seattle, managed to do so without stirring up trouble or controversy. It partnered with a marijuana-tracking software startup.

"We're not the sexy company, but we're the smart company," said David Dinenberg, founder and CEO of Kind Financial, who orchestrated the deal. "We're providing infrastructure."

Kind, founded in 2013, makes software for cannabis growers, sellers, and government agencies to help them monitor marijuana from "seed-to-sale." It collects and crunches data to ensure every leafy bud gets processed in compliance with state law and federal guidelines.

In practical terms, the company ensures marijuana grown legally can't disappear into the black market, and entrepreneurs in the space are held accountable for paying taxes on the product they move.

In its new partnership, Microsoft packages Kind's software in a suite of cloud-based tools that it distributes to clients in state, county, and municipal governments. The startup has yet to land a government contract, though there will soon be news on that front, Dinenberg said.

Wooing Microsoft was not easy, according to Dinenberg, who worked in real estate for 17 years before entering the marijuana space.

In 2015, a Kind board member used his connections at Microsoft to land Dinenberg a meeting. Dinenberg said he had "no visions of grandeur," but figured it was worth a shot.

"I remember the first 15 conversations I had with them, I ended every conversation with, 'Just to be clear, you know what industry I'm in?'" he says.

An artist's rendering of the company's logo shows a pot leaf. Melia Robinson/Business Insider Kind appealed to Microsoft because it doesn't touch the plant, Dinenberg guesses. There's less legal risk for companies that provide ancillary services (even when the end-user deals in pot) than those that grow or sell the plant. Marijuana remains federally illegal.

"We support solution providers working with government customers to help them meet their missions," a Microsoft spokesperson said in a statement provided to Business Insider.

"At the end of the day, we are a technology company that provides services. We happen to cater to the marijuana industry, but we don't grow marijuana," Dinenberg said.

It helps that someone might visit Kind's website and do a double-take before realizing the company tracks marijuana. You won't find pot leaves or stoner iconography in its branding.

One in five Americans will soon live in states with legalized weed. But it's still difficult to start a company in the space. Dinenberg knows first-hand. Eleven law firms rejected him before he found his current representation.

Finding a bank that's willing to back your business is even harder. While the US Department of Justice largely stays out of the way of marijuana-focused companies that abide by state laws, few banks and credit unions open accounts for those entrepreneurs.

Most dispensaries keep ATMs on site because they can't accept credit cards, and state tax collectors end up processing bags of bills. There's no infrastructure for determining how much tax revenue a business should produce, which discourages some states from legalizing weed.

Budtenders display buds in the shape of Christmas trees that are on sale for the holiday season in a recreational marijuana shop in Denver. AP Photo/David Zalubowski

Kind's software aims to bring a level of accountability that could remove the financial hurdles for entrepreneurs, while also helping state governments keep tabs on sales and commerce.

"Every heavily regulated industry has track-and-trace. Cigarettes are tracked, alcohol is tracked, gaming — slot machines — are tracked," Dinenberg said. "The backbone of every one of those industries is compliance."

As tame as Microsoft's foray into the marijuana marketplace may seem, it marks a huge step for both the technology and marijuana industries.

"Someday when they teach the evolution of the cannabis industry, that Microsoft [and Kind] announcement is going to be on the flowchart. It's going to be there," Dinenberg said. "It fills me with such great pride as an entrepreneur to be able to claim that."

Dinenberg hopes the new deal with Microsoft becomes the first domino to fall as more tech giants look to get involved in the marijuana industry in a post-prohibition era.