Business software company Yammer Inc. agreed to sell itself to Microsoft Corp. for $1.2 billion, according a person familiar with the matter, in a sign Microsoft may be trying to plug holes in its ubiquitous Office software.

It is unclear when the Yammer acquisition will be completed and announced, according to the person familiar with the deal.

A Microsoft spokesman declined to comment. Representatives for Yammer didn’t immediately respond to requests for comment.

Yammer is often called Facebook Inc. for the workplace because it creates private social networks inside companies. Yammer, launched in 2008, also has file-sharing tools and other software. A sale of Yammer further validates a cadre of young companies — which includes Box Inc., Jive Software Inc. and Basecamp — that are vying to shake up the ways people work.

Some of the new arrivals, like Yammer, are trying to replace existing tools for digital messaging or keep up with to-do lists. Start-ups such as Dropbox Inc. give workers new ways to store files online or edit them together with co-workers.

These companies don’t grab as many headlines as popular consumer Web companies such as Facebook or Twitter Inc., but investors and established technology companies are taking note. Jive, which went public in December, has seen its stock price rise 50 percent from its initial public offering price. Dropbox has a private-market valuation of $4 billion. Tech giants including Oracle Corp. have been buying scores of business software start-ups.

If Microsoft completes the deal for Yammer, it would be the second time in about a year that Microsoft intercepted a company on the way to a potential initial public offering. Last May, Microsoft agreed to buy video-calling service Skype for $8.5 billion, the biggest acquisition in the company’s history. Skype’s owners had filed documents with regulators to take the company public, but Skype concurrently was pursuing a possible sale.