Apple CEO Tim Cook joined over 4,000 Apple employees marching in the San Francisco Gay Pride Parade on Sunday.

Like his employees, Cook appeared in the parade wearing a white T-shirt bearing a rainbow-colored Apple logo T-shirt with the word "Pride" to mark the 45th anniversary of the Stonewall riots and start of the gay rights movement, Time reported.

Many Apple employees said Cook made a surprise appearance at company pre-parade festivities, where he greeted and took pictures with employees.

Cook's sexual orientation has been the subject of an ongoing discussion. It caused an awkward moment on Friday's episode of CNBC's "Squawk on the Street" when a host said Cook is gay in a segment about openly gay high-level business leaders, Advocate.com reported. The Apple leader has never made a public statement about his orientation.

The San Jose Mercury News reported that over 100,000 spectators and marchers participated in the 44th annual parade marching through San Francisco's downtown to City Hall, including other corporate sponsors like Google, which marched in a World Cup-themed float. Other companies, like Kaiser Permanente, Facebook and Whole Foods, also participated, as did representatives from religious organizations, such as the Church Ladies for Gay Rights.

"Many religions use the Bible to try to beat people into submission," said Michelle Buggy, dressed in 19th-century clothing with four other women from a Sonoma church, The Associated Press reported. "We want to show the love that's in the Bible."

House Minority Leader Nancy Pelosi and San Francisco Mayor Ed Lee were among the many elected officials who marched down San Francisco's Market Street. A number of gay San Francisco Police Department officers marched in the parade while holding hands.