Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The From field of in emails in MSPbots notifications is customizable to use your company email instead of the default default support@mspbots.ai. This article shows how to change the sender's email address and add using the OAuth2 method for more secure authorization. 

What's on this page:

Table of Contents
minLevel2

Background information 

...

OAuth (Open Authorization) 2.0 is the modern standard to allow a website or application to access resources hosted by other web apps on behalf of a user. It adds security by providing consented access and restricting client actions performed on resources without sharing the user's credentials. 

A customized email reinforces branding efforts and enhances the credibility and recall of a company. When clients prefer using their company email to send reports, they can go to the Outgoing Mail settings to modify the default sending address. Now that basic authentication will be disabled and OAutho 2.0 is the new de facto industry standard for online authorization, MSPbots offers an option to add an extra authentication step in setting up the SMTP configuration for modifying the the From field address for outgoing emails and sending reports. Users now have the option to add the basic or use OAuth 2.0 authorization to their Outgoing Mail settings.  in the Outgoing Mail settings.

If you prefer using only the basic authentication to modify the Outgoing Mail settings, refer to the article How to Configure the Outgoing Mail Using Basic Authentication

Prerequisites for editing the Outgoing Mail settings 

...

You must have admin permissions the following to perform the procedure below  

Customizing the sending address of outgoing emails

open email settings gifImage Removed

...

Important reminders on filling out the form

below: 

  • Admin permissions 
  • Inclusion in the Azure Active Directory (AAD) 
  • Outlook 365 license 
  • Application and developer roles for configuring the AAD 

Gathering the MS OAuth 2.0 credentials for authorization

...

Follow these steps to generate the required information:

  1. Anchor
    hostname
    hostname
    Prepare the redirect uniform resource identifier (URI) which will handle the callback from the authorization server after the user grants permission. You must configure the redirect URI correctly to receive the authorization code or access token securely.  
    An example of a redirect URI is 

         https://yourapp.com/oauth/callback

    where yourapp.com is the hostname
  2. Sign in to the Microsoft Azure portal and secure the credentials needed for the OAuth 2.0 authorization. 
  3. Create a new app registration. 

    1. On the Microsoft Azure homepage, click App registrations
      register in AzureImage Added

    2. When the App registrations page opens, click the +New registration tab. 
      register new appImage Added

    3. In the Register an application form:

      1. Enter a Name for your application. 

      2. Select Account in this organizational directory only from the options for Supported account types.   

      3. Enter the redirect URI from Step 1.

      4. Click Register
        register an appImage Added

    4. The Application (client) ID will be shown after your registration is done. Take note of this ID. 

    5. Next, go to Certificates & secrets in the sidebar menu then click +New client secret on the right. 
      new client secretImage Added

    6. Anchor
      idandsecret
      idandsecret
      On the Add a client secret window: 

      1. Add a description. 

      2. Select an expiry date from the Expires dropdown menu.
        add client secretImage Added

        Note

        Before the secret expires you must create a new secret and apply it to the MSPbots Outgoing Mail settings. 

      3. Click the copy icon to copy the generated Value and Secret ID. You will use these values later when configuring OAuth 2.0 in the mail settings. 
        copy secretImage Added

    7. Next, go back to the Overview and click the Endpoints tab.

    8. Anchor
      authandtokenurl
      authandtokenurl
      Copy the OAuth 2.0 authorization endpoint (v2) and the OAuth 2.0 token endpoint (v2) to your local desktop. You will also use these values for creating the OAuth 2.0 credential in the mail settings. 
      authorize endpointsImage Added

    9. Set API Permissions:

      1. Navigate to API permissions on the sidebar menu and click the Add a permission button on the API Permissions page of your application. 

      2. Select the Microsoft APIs you need access to. Example: Microsoft Graph

      3. Next, select Delegated permissions and enter SMTP.Send in the Select permissions field. 

      4. Click the Add permissions button. 

Setting up OAuth 2.0 in MSPbots 

...

Other configuration options in Settings: 

  • Edit - ClickImage Removed to edit the settings of an Outgoing Mail configuration.
  • Delete - ClickImage Removed to delete an Outgoing Mail setting from the list. 
    system actionsImage Removed

Setting up OAuth 2.0 authentication for sending emails 

OAuth (Open Authorization) 2.0 is the modern standard to allow a website or application to access resources hosted by other web apps on behalf of a user. It adds security by providing consented access and restricting the actions that the client app can perform on resources without sharing the user's credentials. 

...

...

  1. Open the MSPbots app and go to Settings > System. 
  2. Click Outgoing Mail in the upper right corner of the Settings tab.
  3. Click Add v and select OAuth2
    add oauth 2.0 authorizationImage Added
  4. Fill in the following fields
    1. Host Name - Use the information in
    the Add window and click Authorize
    1. Step 1 of the previous section.
    2. Authorization URL and Token URL - Use the values from Step 3.h of the previous section. 
    3. Redirect URI - This value is pre-filled. 
    4. Client ID and Client Secret - et the values generated in Step 3.f of the previous section. 
    5. Username - Enter your username. 
    6. Reply to -  Enter your preferred email.
    7. Signature - Input your signature. 
      add oauth 2.0Image Added
  5. Click Authorize.
  6. When the confirmation pop-up window opens, click Continue
  7. On the Microsoft login screen, enter the user password you provided in the OAuth 2.0 credential and click Sign In
  8. Click Accept in the pop-up window with the requested permissions. Refresh

Verifying if the authentication is successful 

...

To verify if the configuration works, refresh the mailbox list page. The mailbox status should

...

show Verified for a successful authentication.

...

If the status is Not Verified, repeat Step 4 onwards until the authorization is successful


Related Topics 

...

Content by Label
showLabelsfalse
max5
showSpacefalse
excludeCurrenttrue
cqllabel in ("outgoing","mail")