Dozens of companies worked together to file court papers. Others used Super Bowl ads to promote messages of inclusion and tolerance to 111 million viewers. Starbucks promised to hire 10,000 refugees.

Opposition to President Trump's immigration order isn't just coming from Democrats or judges. It's coming from corporate America.

The companies are concerned about access to skilled foreign workers and foreign markets. But corporate opposition to the order goes further, in some cases calling it unconstitutional or suggesting it conflicts with American values.

All the businesses opposed to the order have faced a tricky calculation -- how to respond to a new president whose base of support overlaps with their own customers, and who has shown he is willing to call out a company without warning.

On January 27, Trump ordered a temporary halt to the arrival of refugees into the United States and travel by citizens of seven Muslim-majority countries.

That order was put on nationwide hold Friday by a federal judge ruling on a suit brought by the attorneys general of Minnesota and Washington.

Perhaps the most forceful corporate response came late Sunday and Monday, when 127 companies, almost all of them in the tech industry, joined the legal challenge. The group included Apple (AAPL), Google (GOOG), Facebook (FB) and Microsoft (MSFT), as well as Elon Musk's Tesla and SpaceX.

Amazon (AMZN) and Expedia (EXPE) had already filed motions opposing the order.

But mounting a legal challenge is not the only way companies are challenging Trump on immigration. And it's not just tech companies weighing in.

Starbucks (SBUX) CEO Howard Schultz sent out a notice last week saying that the coffee retailer would hire 10,000 refugees.

"We have a long history of hiring young people looking for opportunities and a pathway to a new life around the world," he wrote to employees.

Ford Motor (F), which is based in Dearborn, Michigan, home to the greatest concentration of Arab Americans, issued a strongly worded statement opposing the ban as a violation of company values, including respect and inclusion.

General Electric (GE) issued a statement to employees by CEO Jeff Immelt opposing the ban. Lloyd Blankfein, the CEO of Goldman Sachs (GS), told the Wall Street firm's employees, "This is not a policy we support." He added that "being diverse is not optional; it is what we must be."

Related: Here's the motion detailing companies' objections to Trump's travel ban

On Sunday night, companies spent millions each on Super Bowl ads, and brought what were seen as pro-immigration messages before the largest TV audience of the year.

84 Lumber showed the arduous journey by a mother and young girl to America, which ended with finding a way through a door in a border wall. An online version of the spot ended with the slogan "The will to succeed is always welcome here."

Coca-Cola (KO) revived a spot with a multilingual rendition of "America the Beautiful" played over a montage of people of many cultures, ending with the tagline "Together is Beautiful."

Airbnb, which also joined the legal challenge Sunday, aired a celebration of multicultural America that ended with the hashtag "#WeAccept."

Related: These are the companies fighting Donald Trump's travel ban

Anheuser-Busch (BUD), which last year temporarily changed the name of its core Budweiser brand to America, used its ad Sunday to tell the story of its immigrant founder, and the anti-immigrant sentiment he faced when he arrived in America on the eve of the Civil War.

Other executives, such as Tesla (TSLA) and SpaceX CEO Musk, say they are working to change the policy through other channels. Musk, unlike his counterpart at Uber, elected to stay on Trump's business advisory council after the ban was announced.

Related: The big tech holdouts in legal battle with Trump

While foreign markets and finding skilled workers in foreign countries are important to corporate America, the companies risk a backlash by challenging Trump on immigration. There were online calls for boycotts of several of the companies after the ads aired.

Tech companies are worried about H-1B visa program, which they depend on to bring in skilled foreign workers. Trump has threatened changes to the program.

Ford and other automakers are waiting to see what policies apply to cars and parts built in Mexico that virtually all of them depend upon. Automakers generally, and Ford in particular, have been targets of Trump's Twitter attacks.

Goldman and other Wall Street firms are waiting to see the new rules that will apply to financial services as Trump moves to overturn the Dodd-Frank act.

While Goldman's statement to employees was in strong opposition to the ban, statements by CEOs of other financial firms, such as JPMorgan Chase, Bank of America, and Wells Fargo, stopped short of criticizing it outright.