The Azure Active Directory (Azure AD) v2.0 endpoint supports the industry-standard OAuth 2.0 and OpenID Connect 1.0 protocols. The Microsoft Authentication Library (MSAL) is designed to work with the Azure AD v2.0 endpoint. It’s also possible to use open-source libraries that support OAuth 2.0 and OpenID Connect 1.0.
It’s recommended that you use libraries written by protocol domain experts who follow a Security Development Lifecycle (SDL) methodology, like the one followed by Microsoft. If you decide to hand-code support for the protocols, follow a methodology like Microsoft’s SDL and pay close attention to the security considerations in the standards specifications for each protocol.