How can we help?

How to set up Office365 Oauth2 in Email To SMS Poller

Follow

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: https://portal.azure.com

 

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).

1.png


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

2.png


5. In the toolbar, click on New registration

3.png

 

4.png

 

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
    5v2.png


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



  • Description: Password
  • Expires: however long you want (suggested value: 24 months)
  • Click Add button

    7.png

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

8.png


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



  • 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

    10.png



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



7. Now go back to SMSEagle webGUI > menu Email To SMS Poller > Settings tab

  • choose Protocol: IMAP + Oauth2 (Office365)
  • enter Host for IMAP: outlook.office365.com
  • 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
    14.png


  • 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
    15.png



  • 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

    13.png

 

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