The new leader of Catalonia's government, Quim Torra, said he was committed to achieving independence for Catalonia and wanted to enter into talks with Mr Sanchez to end a standoff between Barcelona and Madrid. Under the Spanish Constitution, Rajoy's government sent resignation to the king.
That means Sanchez will have to reach agreement with the left wing Unidos Podemos party, who have 71 seats, and a variety of Basque and Catalan parties, among others to pass any legislation.
Pedro Sanchez was sworn in as Spain's Prime Minister on Sunday, a day after the Socialist party (PSOE) leader successfully ousted predecessor Mariano Rajoy who lost a no-confidence vote in parliament.
His party has been plagued with corruption allegations for years and he had faced the humiliation of testifying in cases against its members, though he was not among the accused.
Sanchez filed a no-confidence motion against Rajoy on May 25, a day after a court found former officials of his conservative Popular Party (PP) guilty of running a slush fund.
"We also have taken note of the commitment made by the new prime minister Sanchez not to modify the budget", added Juncker's spokeswoman Mina Andreeva.
"I am aware of the responsibility I am assuming, of the complex political moment our country is going through and I will rise to all the challenges with humility and dedication", Sanchez said after the vote to remove Rajoy from office.
All of his allies in the no-confidence motion stressed their vote against Rajoy was not a blank cheque for Sanchez.
On Friday, the Congress of Deputies (the lower parliamentary chamber) of Spain voted to express no confidence in Mariano Rajoy's government in the wake of a high-profile corruption scandal.
Sanchez will only be able to implement policy initiatives "that allow him to obtain an easy majority" in parliament, said Fernando Vallespin, political scientist at the Autonomous University of Madrid. After the oath, he and Felipe shook hands and posed for photographs.
Unlike the new populist government in Italy, Sanchez and his party are staunch supporters of the European Union and its shared euro currency.
Mr Sanchez's majority was the smallest for any Spanish government since the return to democracy after Francisco Franco's death in 1975, makes it unclear how long his administration can last. "And in five or six months we will either have fresh elections or they will oust him", he added.