Windows Server 2019 does have the ability to work with Azure Active Directory (AAD) for OAuth2.
In order to use AAD for OAuth2 on Windows Server 2019, you will need to set up an AAD tenant and register your application with AAD. Once your application is registered, you can use AAD's OAuth2 endpoint to authenticate users and obtain access tokens for your application.
To set up AAD on Windows Server 2019, you will need to install the Azure Active Directory Module for Windows PowerShell and use it to connect to your AAD tenant.
Additionally, you can use the following libraries to implement OAuth2 on Windows Server 2019:
- Microsoft.IdentityModel.Protocols.OAuth2
- Microsoft.IdentityModel.Clients.ActiveDirectory
- System.IdentityModel.Tokens.Jwt
Please note that, Azure Active Directory (AAD) is a cloud-based identity and access management service, and Windows Server 2019 is an operating system. These two are different technologies, but they can be integrated to achieve the goal.