Microsoft (MSFT:US) shares rose Wednesday after the Redmond-based titan reported stronger-than-expected FQ3 results on Tuesday afternoon.

Microsoft delivered a profit per share of $2.45 on revenue of $52.86 billion, topping the analyst consensus for earnings of $2.23 per share on revenue of $51.02 billion, according to Refinitiv. 

Speaking on the earnings call, Microsoft CFO Amy Hood said the company expects to generate between $54.85 billion to $55.85 billion for the current quarter, ahead of the analyst consensus of $54.84 billion. Hood also weighed in positively on the company’s artificial intelligence (AI) efforts.

“As with any significant platform shift, it starts with innovation, and we’re excited about the early feedback and demand signals from the AI capabilities we’ve announced to date,” she said. 

“We will continue to invest in our cloud infrastructure, particularly AI-related spend, as we scale to the growing demand driven by customer transformation. And we expect the resulting revenue to grow over time.”

Investors were positively surprised by the resilience of Microsoft’s cloud business given macro concerns. The Intelligent Cloud business generated $22.08 billion in revenue, beating the $21.94 billion consensus. 

Following the report, at least 2 sell-side analysts upgraded Microsoft shares, citing a massive generative AI opportunity.

“We believe MSFT will continue to outperform thanks to growth, earnings, new business opportunities with Generative Al,” Macquarie analysts said in a note.

The rally in Microsoft shares, which is up nearly 23% year-to-date, comes after some Congress members moved to sell the stock and book profits. Most notably, Rep. Michael McCaul and Michael Burgess reported the sale of MSFT shares in March and April.

Conversely, Representatives Josh Gottheimer and Daniel Goldman were buyers of the stock in March despite a strong YTD rally.