

In addition, you can request for offline_access scope. Make sure to specify the full scopes, including Outlook resource URLs, when authorizing your application and requesting an access token. You can use one of our MSAL client libraries to fetch an access token from your client application.Īlternatively, you can select an appropriate flow from the following list and follow the corresponding steps to call the underlying identity platform REST APIs and retrieve an access token. To use OAuth, an application must be registered with Azure Active Directory.įollow the instructions listed in Register an application with the Microsoft identity platform to create a new application. Authenticate connection requests with an access token.Get an access token from a token server.Register your application with Azure AD.

To use OAuth with your application, you need to: You can use the OAuth authentication service provided by Azure Active Directory (Azure AD) to enable your application to connect with IMAP, POP or SMTP protocols to access Exchange Online in Office 365. To learn more about the Microsoft Authentication Libraries (MSAL), which implement the OAuth 2.0 protocol to authenticate users and access secure APIs, read the MSAL overview. If you're not familiar with the OAuth 2.0 protocol, start by reading the OAuth 2.0 protocol on Microsoft identity platform overview. OAuth2 support for IMAP, POP, SMTP protocols as described below is supported for both Microsoft 365 (which includes Office on the web) and users. Learn how to use OAuth authentication to connect with IMAP, POP or SMTP protocols and access email data for Office 365 users.
