Microsoft Corp. has agreed to rent a data center project in Texas that was originally being developed for Oracle Corp. and OpenAI, according to people familiar with the situation.