Microsoft is buying Internet start-up Yammer for $1.2 billion in an attempt to bring Facebook-like sharing features to its widely used suite of business software applications.

Yammer specializes in creating private social networks so employees within the same company can keep tabs on what colleagues are working on. That’s similar to how Facebook’s online social network allows friends and families to track what’s happening in each other’s personal lives.

The deal, announced Monday, comes nearly two weeks after word of Microsoft’s negotiations with Yammer first leaked out in published reports.

The acquisition represents Microsoft’s latest attempt to adapt to a major shift in the technology industry, one that is fuelling demand for more Internet-connected services and social-networking tools.

The upheaval is threatening to marginalize Microsoft Corp., the world’s largest software maker, and ultimately diminish the amount of money coming in from sales of its Windows operating system and a wide range of applications designed primarily for personal computers.

As part of its effort to remain relevant, Microsoft paid $8.5 billion last year for Internet video chat service Skype in the largest acquisition in its history.

In another bold move, Microsoft last week unveiled its own tablet computer, Surface, to compete with Apple Inc.’s iPad. Microsoft has designed Surface to run on the upcoming Windows 8, the biggest change to the company’s operating system in nearly two decades.

Microsoft CEO Steve Ballmer is counting on Yammer’s sharing tools to ensure that long-established Microsoft applications, including its word processing and spreadsheet programs, remain vital components for getting work done. Google Inc. has emerged as a threat with a toolbox of similar programs that run primarily over the Internet rather than on individual machines.

“Think of Yammer as a fundamental part of our Office family,” Mr. Ballmer said on a Monday conference call.

Microsoft will have much of the same autonomy given to Skype since that deal closed eight months ago. Yammer will continue to be run from its San Francisco headquarters by its co-founder and CEO, David Sacks. It will also continue to provide its services separately from Microsoft’s offerings.

Microsoft did not give a time frame for when the deal should close.

Although other companies such as Jive Software Inc. and Inc. are building social networks for businesses, Yammer shares the most DNA with Facebook Inc.

When it started in 2008, Yammer raised its initial funding from Peter Thiel Facebook’s first major investor. Mr. Thiel formerly worked with Mr. Sacks while they were both executives at PayPal, an online payment service that eBay Inc. bought for $1.5 billion in 2002.

Sean Parker, the former Facebook president depicted by Justin Timberlake in the 2010 movie “The Social Network,” also sits on Yammer’s board of directors. Mr. Parker still owns a 4.6 percent stake in Facebook currently worth about $2.2 billion.

Microsoft has its own financial ties to Facebook, having invested $240 million in the social network in 2007. After selling $250 million in stock in Facebook’s initial public offering last month, Microsoft still retains a 1.7 percent stake worth about $840 million.

Yammer has relied largely on word of mouth to attract more than 5 million registered users at more than 200,000 companies worldwide.

The service depends on employees to use its free tools to set up a private network within their company. Once the network is getting wide usage, Yammer then tries to sell more sophisticated features to the companies.

As a privately held company, Yammer hasn’t disclosed its revenue. In a Monday note about the Microsoft deal, Nomura Securites analyst Rick Sherlund estimated Yammer’s revenue at $15 million to $20 million last year.

The company has been expanding so rapidly that it had been considered a prime candidate to pursue an IPO by next year.

The sale will provide a hefty return for Yammer’s early backers. The start-up has raised about $142 million in venture capital.