How can we help?

How to set up Office365 Oauth2 in Email To SMS Poller


In this tutorial, we’ll show you every step needed to set up the Office365 Oauth2 authentication for Email To SMS Poller.


1. Open the Azure Cloud Portal:


2.Login with the administrator account. If you don't have administrator rights for Office365, ask your admin to complete steps 3-6.

3. Go to Manage Azure Active Directory (you may have use the searchbox if the button is not on the landing page).


4. In the menu on the left, select App Registrations


5. In the toolbar, click on New registration





6. You are now taken to the details page for the new App.

  • The Client id and Tenant id can be found under the heading "Essentials", copy them somewhere safe

  • In the menu on the left, select Certificates & secrets
  • Click on New client secret

  • Description: Any description text (can be "Password")
  • Expires: however long you want (suggested value: 24 months)
  • Click Add button


  • The Client secret can be found under the header: Value, copy it somewhere safe


  • In the menu on the left, select API permissions
  • In the toolbar, click on Add a permission

  • Click on Microsoft Graph
  • Click on Delegated Permissions
  • Search for "IMAP.AccessAsUser.All" and select it
  • Search for "POP.AccessAsUser.All" and select it
  • Search for "SMTP.Send" and select it
  • Click on Add permissions

    Comment: Although only IMAP method will be used within the app, Microsoft requires all three permissions for the Oauth2 authentication to work correctly


  • click on Grant admin consent for [your company]
  • confirm with Yes button
  • green ticks should appear in the Status column

7. If you are signed in to your Office 365 account in your browser, please sign out before continuing.


8. Go back to SMSEagle webGUI > menu Email To SMS Poller > Settings tab

  • choose Protocol: IMAP + Oauth2 (Office365)
  • enter Host for IMAP:
  • Username: enter email address for the account which will be used for Poller
  • OAuth Client ID: value saved in steps above
  • OAuth Client Secret: value saved in steps above
  • OAuth Tenant ID: value saved in steps above
  • click Save button
  • click Authenticate via Oauth button

  • once you’ve clicked the Authenticate via Oauth button, you should be redirected to a login page. Sign in with the email account that you want to use for Email To SMS Poller to accept Microsoft permission query for access to the Inbox

  • after the process is completed you will be redirected back to SMSEagle webGUI. You should see "Oauth authentication success" message if the process is completed successfully



Final Notes: It can take up to several hours for Azure permissions changes to propagate throughout Azure servers. If you encounter unexpected Microsoft permission alerts (for example "Need admin approval") in point 7. please wait until your app permissions propagate.


Was this article helpful?
0 out of 0 found this helpful