Microsoft (MSFT) - Get Report was granted a license from the Department of Commerce to do business with Huawei Technologies, the Chinese company blacklisted by the US. government.

"On November 20, the U.S. Department of Commerce granted Microsoft's request for a license to export mass-market software to Huawei. We appreciate the department's action in response to our request," the software giant said in a statement Thursday.

Microsoft sells Windows and Office software to Huawei, according to Bloomberg.

In May, the Commerce Department added Huawei Technologies to its Entity List, which barred the sale or transfer of American technology to the company. Huawei has denied U.S. claims that it threatens national security.

Shares of Microsoft rose 0.4% to $150.08 in premarket trading Friday. The stock has gained more than 47% since the beginning of the year.

The Department of Commerce earlier this week extended for 90 days Huawei's temporary general license, allowing U.S. carriers to continue to do business with the company.

"The Temporary General License extension will allow carriers to continue to service customers in some of the most remote areas of the United States who would otherwise be left in the dark," Commerce Secretary Wilbur Ross said in a statement.

"The Department will continue to rigorously monitor sensitive technology exports to ensure that our innovations are not harnessed by those who would threaten our national security," the secretary added.

Microsoft is a holding in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells shares of MSFT? Learn more now.