Leaders from across the technology industry criticized President Donald Trump’s temporary ban on foreign nationals from seven Muslim-majority countries, ending weeks of cautious engagement with the new president, whom many in Silicon Valley opposed.

Alphabet Inc.’s Google, Apple Inc., Facebook Inc., Microsoft Corp., Uber Technologies Inc. and other companies expressed concern about the immigration order’s effect on their employees, with some executives saying the ban violated their personal and company principles.

...