# Microsoft with OAuth2

## Checking your account details and subscription

Subarticles in this section explain how to enable Microsoft 365 OAuth2 in your Microsoft Azure tenant to authenticate Email This Issue. This allows you to send FROM and receive TO your Microsoft 365 address using this application.

This guide applies to creating and configuring client credentials for both incoming and outgoing connections requiring the following OAuth2 authentication:

* [IMAP and SMTP with OAuth2 authentication](https://docs.meta-inf.hu/email-this-issue/administration/mail-server-connections/microsoft-with-oauth2/microsoft-imap-and-smtp-with-oauth2)
* Microsoft Graph API (uses OAuth2 by default) with Delegated permissions
* Microsoft Graph API (uses OAuth2 by default) with Client Credentials Grant flow (Application permission)

Before you begin with the app registration, check if you have the following:

* A Microsoft365 account&#x20;
* An active[ Exchange Online license](https://portal.office.com/account/?ref=MeControl#subscriptions) (aka “subscription”). Otherwise, you will get obscure error messages during the authorization process.

For example, if you have a Microsoft 365 Business Standard package, you should see something like this:

<figure><img src="https://880912854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mf8H-oTE_fhOrUtfYrN-2724419853%2Fuploads%2FN7dOJDP0WpjSuXiLtCI6%2Fimage.png?alt=media&#x26;token=41d73ca7-5b6c-41d9-a55a-23534decce05" alt="Double-checking the Microsoft 365 subscription"><figcaption><p>Double-checking the Microsoft 365 subscription</p></figcaption></figure>

## Authentication options for connecting to Microsoft

* [Microsoft IMAP and SMTP with OAuth2](https://docs.meta-inf.hu/email-this-issue/administration/mail-server-connections/microsoft-with-oauth2/microsoft-imap-and-smtp-with-oauth2)
* [Graph API with Auth Code (Delegated access)](https://docs.meta-inf.hu/email-this-issue/administration/mail-server-connections/microsoft-with-oauth2/microsoft-graph-api-with-oauth2/graph-api-with-auth-code-delegated-access)
* [Graph API with Client Credentials Grant (Application access)](https://docs.meta-inf.hu/email-this-issue/administration/mail-server-connections/microsoft-with-oauth2/microsoft-graph-api-with-oauth2/graph-api-with-client-credentials-grant-application-access)
