Versions Compared

Key

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

...

  1. Anchor
    hostname
    hostname
    Prepare the redirect uniform resource identifier (URI) which is https://app.mspbots.ai/web/um/smtp/redirect. Once the authorization is successful, Microsoft will use this URI to notify MSPbots about the authentication result. 

    You can find this information with the following steps:

    1. Go to Settings > System > Outgoing Mail.

    2. Click Addv and select OAuth2

    3. When the Add window opens, go to the Redirect URI field and copy the given URL. 

       
  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.  If you can't find App registrations on the Microsoft Azure homepage, please search in the search bar.
      register in Azure

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

    3. In the Register an application form:

      1. Name - Enter a Name unique namefor your application. 

      2. Supported account types -Select Account in this organizational directory only(MSPbots.ai only - Single tenant) from the options for Supported account types.   

      3. Enter the redirect URI from Redirect URI(optional) - In the first box, select Web and in the second box, enter the Redirect URI copied from Step 1.

      4. Click Register
        register an app

    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 , then在Client secrets tab下 click +New client secret on the right. 
      new client secret

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

      1. Description - Add a description. 

      2. Expires - Select an expiry date from the Expires  dropdown menu.
        add client secret

        Note

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

      3. Click Add located at the bottom of the Add a client secret window.
      4. Once the Update application credentials popup appears in the top right corner of the page, the addition is successful.、

      5. Click the copy icon to copy the generated Value and Secret IDbelow the Value. You will use need these values later when configuring OAuth 2.0 in the mail settings.
        copy secretImage Added---换图
    7. Next, go to API Permissions in the sidebar menu.

      1. Click the Add permissions button. 
        copy secretImage Removed
      2. Under the Microsoft APIs tab, select Microsoft Graph.
      3. Next, select Delegated permissions.
      4. Enter SMTP in the search bar under Select permissions, then click SMTP and check SMTP.Send.
      5. Enter IMAP in the search bar under Select permissions, then click IMAP and check IMAP.AccessAsUser.All.
      6. Click the Add permissions button.
      7. The permissions you added will appear in the Configured permissions list.
    8. Next, go back to the Overview and click the Endpoints tab.
    9. 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 Modified

      Set API Permissions:

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

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

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

    13. Click the Add permissions button. 

Setting up OAuth 2.0 in MSPbots 

...

  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  and select OAuth2
    add oauth 2.0 authorization
  4. Fill in the following fields: 
    1. Host Name - Use the information in Step 1 of the previous sectionCannot be modified.
    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.0
  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. 

...