Hi,
SAML, and Oauth2/OpenID Connect can both be used.
Here's the documentation on creating an enterprise application with the latter.
To add the required features to your application, I recommend using the Microsoft Authentication Library (MSAL) available from GitHub. The library is available for many programming languages, frameworks and runtimes.