Big savings, Better ROI! Exclusive discounts on ManageEngine Products!* Boost your business *T&C apply
    Click here to shrink
    Click here to expand Click here to expand

    Configure the email server using an API

    This type of email server connection will be authenticated with the help of your email provider's API.

    Prerequisites

    To configure the email server using an API, choose one of the following as your email provider:

    Email server configuration using an API with Microsoft Azure as your email provider

    If you are using Microsoft Azure as your mail provider, find the Azure tenant ID, Client ID, and Client Secret using the steps listed below:

    1. Go to the Azure portal and sign in using your Microsoft account.
    2. Select Azure Active Directory from the Azure services section.
    3. Go to Manage > App registrations > + New registration to open the Register an application window.
    4. Enter the application name (e.g., ADAudit Plus Application) and select the default Supported account types.
    5. On the left pane, go to Manage > API permissions > + Add a permission.
    6. Select Microsoft Graph. Click Application permissions as the type of permission required.
    7. From the listing, select Mail > Mail.Send. Click Add permissions.
    8. Select Grant admin consent for <tenantname>.
    9. Find and copy the values of the Client ID and Tenant ID displayed.
    10. On the left pane, go to Manage > Certificates & secrets.
    11. Click + New client secret.

      Enter an appropriate description. Choose 24 months as the expiration date; this is the maximum value that can be used.

    12. Click Add.
    13. Find and copy the client secret value (e.g., "14uClLxkHtIVGR3wkCq12341Nd5VtestkkWTyIPrrE=").

    Email server configuration using an API with Google as your email provider

    If you are using Google as your email provider, then perform the following:

    Steps to find the JSON private key

    1. Go to https://console.developers.google.com/ and log in to your Google Account.
    2. Navigate to the Service Accounts page.
    3. Click the Select a project drop-down and click NEW PROJECT.
    4. Click + CREATE SERVICE ACCOUNT. In the Service account details window, specify the Service account name, Service account ID, and Service account description. Click CREATE AND CONTINUE.
    5. Click Grant this service account access to project to select the IAM roles required for the service account.
    6. Click CONTINUE.
    7. Add the users and groups that you want to allow to access and manage the service account.
    8. Click DONE.
    9. Select the email address of the service account created.
    10. In the Keys section, select Create new key from the ADD KEY drop-down.
    11. Select JSON as the key type.
    12. Click CREATE.
    13. The JSON private key will be generated and downloaded to your local system. A new private key will be generated each time, so once generated, it is vital to keep the key secure.

    Steps to enable Gmail's API service

    1. Log in to https://console.cloud.google.com/.
    2. Go to Projects. Click + ENABLE APIS AND SERVICES.
    3. Choose Gmail API and select ENABLE.

    Steps to provide domain-wide authority to the service account

    1. Log in to the Google Workspace Admin Console as a super administrator.
    2. Go to Security > Access and data control > API controls.
    3. Under the Domain wide delegation pane, choose MANAGE DOMAIN WIDE DELEGATION.
    4. Click Add new.
    5. Type in your service account's Client ID from this page.
    6. In the OAuth scopes (comma-delimited) field, select the scopes that your application needs access to. If it needs domain-wide access to the Gmail API, then type in https://mail.google.com.
    7. Click AUTHORIZE.

    The application now has the authority to make API calls as users within your domain.

    Set up an email server using an API

    • Open the ADAudit Plus web console.
    • Navigate to Admin > General Settings > Server Settings.
    • Choose Mail.
    • Select API mode.
    • Choose your Mail Provider, Microsoft or Google, from the drop-down.
    • In the From Address field, specify the email address from which notification emails are to be sent.
    • In the Email ID for Notifications field, specify the email address to which the notification emails are to be sent.
    • If your mail provider is Microsoft, type in the Tenant ID, Client ID, and Client Secret in their respective fields. If your mail provider is Google, upload the JSON Private Key.
    • Check Send Emails in HTML Format if you require emails in HTML format.
    • Click Save Settings.

    Don't see what you're looking for?

    •  

      Visit our community

      Post your questions in the forum.

       
    •  

      Request additional resources

      Send us your requirements.

       
    •  

      Need implementation assistance?

      Try onboarding

       

    On this page

    Get download link