Set Up Email Importing - Microsoft

WHMCS can import email through several different service providers, including POP3 or IMAP, Google®, and Microsoft®. Google and Microsoft include the benefits of OAuth2, which provides more security than traditional username-and-password authentication.

Set Up Email Importing with Microsoft

To set up email importing using Microsoft, you will need to configure a Microsoft Entra® ID (formerly Microsoft Azure®) app and then configure WHMCS to use it.

1. Create a Microsoft Entra app.

If you have already used the Microsoft Entra console, you may not need to perform some of these steps, or interfaces may not look like the screenshots below.

To do this:

  1. Go to the Microsoft Entra Portal and log in to your existing account or create a new one.
  2. In the left side menu under Applications, choose App registrations and click New registration.
    App Registrations
  3. Enter a name for your application.
    Register an Application
  4. For Supported account types, select Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).
    Supported Account Types
  5. For Redirect URI, select Web and use the Redirect URL value from WHMCS.
    Redirect URL
  6. Click Register to save the application.
    Redirect URL
  7. Copy and store the Application (client) ID value.
    The Client ID
  8. In the Certificates & Secrets menu, click New client secret.
  9. Enter a description and choose a validity length.
    When the validity period expires, you must create a new client secret and repeat the steps to configure Microsoft in WHMCS.

    Add a Client Secret
  10. Copy and store the Client Secret value.
    You cannot retrieve the client secret again.

2. Set up Microsoft in WHMCS.

To set up importing with Microsoft:

  1. Set Friendly URLs to Full Friendly Rewrite or Friendly index.php in the General tab at Configuration () > System Settings > General Settings.
    Do not set Friendly URLs to Basic URLs. You will experience errors. For more information, see Microsoft Import Query Errors.
  2. Go to Configuration () > System Settings > Support Departments.
    Support departments in the Admin Area.
  3. Enter your support department information in the Add New Department section of the page or click Edit for an existing department.
    Editing a support department in the Admin Area.
  4. Under Mail Importing Configuration, select Microsoft for Service Provider.
    Configuring Google for importing
  5. Copy-and-paste the Client ID and Client Secret from the Microsoft Entra console into the appropriate boxes.
  6. In WHMCS, next to Connection Token, click Connect. (There should not be a value in Connection Token yet.)
    Click Connect
    If you have multiple Microsoft accounts, the system may prompt you to choose the correct account. Log in to the email account from which WHMCS will send emails to clients.
  7. Follow the prompts to approve access for your account. When you finish this, WHMCS will automatically enter a token in Connection Token.
  8. Click Save. The system will test your configuration again when you save, and then you will be ready to start using email importing.
  9. Set your System Emails From Email address to the Microsoft mail account that you are using. Microsoft services may not accept email from a different identity.

Last modified: October 30, 2024