Thank you for posting this in Microsoft Q&A.
As I understand you want to use Azure AD authentication to login to your Windows server 2022 via RDP using office 365 accounts.
You can now use Microsoft Entra ID as a core authentication platform to Remote Desktop Protocol (RDP) into Windows Server 2019 Datacenter edition and later, or Windows 10 1809 and later. You can then centrally control and enforce Azure role-based access control (RBAC) and Conditional Access policies that allow or deny access to the VMs.
Below are the network requirements to perform this task,
Azure Global:
-
https://enterpriseregistration.windows.net
: For device registration. -
http://169.254.169.254
: Azure Instance Metadata Service endpoint. -
https://login.microsoftonline.com
: For authentication flows. -
https://pas.windows.net
: For Azure RBAC flows.
To use Microsoft Entra login for a Windows VM in Azure, you must:
- Enable the Microsoft Entra login option for the VM.
- Configure Azure role assignments for users who are authorized to sign in to the VM.
There are two ways to enable Microsoft Entra login for your Windows VM:
- The Azure portal, when you're creating a Windows VM.
- Azure Cloud Shell, when you're creating a Windows VM or using an existing Windows VM.
Below is the article that you can refer where all steps are mentioned to perform this task,
Note: The Windows client machine is required to be either Microsoft Entra registered, or Microsoft Entra joined or Microsoft Entra hybrid joined to the same directory as the VM. Additionally, to RDP by using Microsoft Entra credentials, users must belong to one of the two Azure roles, Virtual Machine Administrator Login or Virtual Machine User Login.
Once you follow the above article you can also set up MFA using Conditional access policy.
Let me know if you have any further questions.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".