Guides & TutorialsSupport ToolsEmail PipingSetting Up Importing via Microsoft

Setting Up Importing via Microsoft

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

You can configure Microsoft email services for email importing in WHMCS 8.6 and later using a Microsoft Azure® app. For more information on setting up other service providers, see Email Importing Integrations.

Before you can use Microsoft email services, you must also set Friendly URLs to Full Friendly Rewrite or Friendly index.php in the General tab at Configuration > System Settings > General Settings.

Set Up Microsoft in WHMCS

To set up importing, create or edit a department at Configuration > System Settings > Support Departments.

Enter your support department information in the Add New Department section of the page. Then, under Mail Importing Configuration, select Microsoft as your Service Provider.

Click the Copy icon next to Redirect URL.

Use this URL to create the necessary Microsoft Azure app. For instructions, see below.

After you create your Microsoft Azure app, copy-and-paste the Application (client) ID and Client Secret from the Microsoft Azure console into the appropriate text boxes.

Click Connect. (Connection Token will be blank until you do this.)

If you have multiple Microsoft accounts, the system may prompt you to choose the correct account.  If you see this prompt, log in to the email account from which WHMCS will send emails to clients.

After you complete the necessary prompts, a success message will display and WHMCS will automatically enter a token in Connection Token.

Click Save. The system will test your configuration again when you save, and then you will be ready to start using email importing.

Make certain to set your From Email address to the Microsoft mail account that you are using. Microsoft services may not accept email from a different identity.

Create Your Microsoft Azure Application

To use Microsoft as your service provider, you will need to create an app. This will let you connect to Microsoft via WHMCS. If you have already used the Microsoft Azure console, you may not need to perform some of these steps, or interfaces may not look like the screenshots below.

Go to the Microsoft Azure Portal and log in to your existing account or create a new one.

Go to Azure Active Directory.

Choose App registrations in the left-side menu and click New registration.

Enter a name for your application.

For Supported account types, select Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).

For Redirect URI, select Web and use the Redirect URL value from WHMCS.

Save the application.

Copy and store the Application (client) ID value.

 

Application (client) ID

Click Add a certificate or secret next to Client credentials.

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.

Copy and store the client secret and the Application (client) ID value.

 

Client secret Value

You cannot retrieve the client secret again. You can use these values to complete configuration in WHMCS.