Help for Alpine - XOAUTH2
You are in Home > Miscellaneous > Setting XOAUTH2 in Outlook

Setting up Outlook is a very nice experience. Once you understand how the authentication flow works in Outlook, it leaves almost all of the work to be done by Alpine and Microsoft's servers. The complexity of the process is invisible to the user.

First, you need to know what to write for your INBOX and SMTP settings.


The first time you try to login to an account, you will be presented with the following screen. First encounter with the set up screen

In the screen it is explained what will happen throughout this process. The most relevant information for us at this moment appears at the top of the screen, and it says that you must point your browser to open a URL and enter a code. We will need a browser that supports javascript. Once you open the URL in the screen, you will see a box where you can enter the code.

Entering Code from Alpine set up screen

After you have successfully entered the code, your browser will redirect you to sign in to your Outlook account. Please note that this will be done even if you are already signed into the account you want to give access to in Alpine.

Sample sign in screen

Enter your username and password. Outlook will give you a screen that shows the permissions you will be granting to Alpine. For purposes of Alpine these are read and write email.

Outlook displays the permissions you will be granting

In order to grant access to Alpine to read and send email, click yes in the blue box in the bottom. After you have done that, you will see a screen that says

Success! Alpine can read and send email in Outlook

As you can read in the screen, you can close the window, because everything has been set up. Nothing more needs to be done in the browser. Now it is time to go back to Alpine.

During the time that you were doing the previous process Alpine has been waiting for this process to end. Alpine has been polling Outlook's servers waiting for the success signal. This will come after all the previous steps have been completed. You do not need to do anything. This notice will probably come within the next 5 seconds that you completed the authorization process.

Once Alpine receives the success notice from the server, it will ask you if you want to save the Refresh Token and Access Code. If you refuse to save them, Alpine will have to repeat all the previous steps the next time it tries to log you into your outlook account. If you answer yes, Alpine will save them securely in your password file.

Success! Alpine can read and send email in Outlook

What happens after this will depend on how long you took to complete this process. If you took a short time, Alpine will open your connection to the server, but if you took too long, Outlook's server will close the connection. Do not panic, simply repeat the operation you were trying, this time you will not go through the previous steps, and the connection will succeed. In any case, you are all done setting up Alpine with Outlook.

When attempting to send an email, Alpine will use the same codes that it obtained while opening a folder. You do not need to do anything special. However, Outlook did not allow me to send email until I gave it a phone number. After I completed that step, sending email via my account was completed successfully.
You are in Home > Miscellaneous > Setting XOAUTH2 in Outlook