Mimecast Cloud Gateway
Fluency polls the SIEM API of Mimecast Email Security Cloud Gateway for every message the gateway received, what its policies decided, whether it was delivered, and what Targeted Threat Protection made of the links and attachments inside it. Alongside it, Fluency reads the URL Protect log (every click on a rewritten link, allowed or blocked), the Attachment Protect log (each sandbox verdict) and the console's audit log. Together they answer "who was sent the phish, who clicked, and did it get through", and correlate directly with the sign-in and endpoint telemetry either side of a click.
Authentication is app-only, over Mimecast API 2.0: an API application issues a client ID and secret, the products you assign it decide which APIs it can call, and the administrator role you bind it to decides what it can read.
The setup has two halves:
- In Mimecast: tick all three options under Account → Account Settings → Enhanced Logging, create a read-only role under Account → Roles (or use Basic Administrator), and register a Mimecast API 2.0 application bound to it under Integrations → Integrations Hub, with the products Threats, Security Events and Data for CG, Security Events and Audit Events; copy its Client ID and Client Secret.
- In Fluency: install the Mimecast CG Events application template and paste those two values in.
| Template | Mimecast API | Credentials |
|---|---|---|
| Mimecast CG Events (this page) | API 2.0 | Client ID, Client Secret |
| Mimecast Events (Legacy) | API 1.0 | Base URL, Application ID, Application Key, Access Key, Secret Key |
Mimecast has closed API 1.0 to new applications, so a first-time connection belongs on this page. Mimecast (Legacy API 1.0) covers tenants that still hold working 1.0 keys, and migrating off them.
What arrives
| Stream | What it holds | Lands in |
|---|---|---|
| Receipt, Process, Delivery | Every message through the gateway: sender, recipient, sending IP and subject; the policies it matched and what they decided, including holds for a malicious URL; its hand-off to the destination, or the failure. | The Mimecast index |
| AV | Malware verdicts. | The Mimecast index |
| URL Protect, Attachment Protect, Impersonation Protect, Internal Email Protect | Targeted Threat Protection events: blocked link clicks, the attachments inspected (with hashes), impersonation hits, threats in internal and outbound mail. | The Mimecast index |
| URL Protect log | Every click on a rewritten link, allowed, warned or blocked, and the URLs held at delivery. | The Mimecast index |
| Attachment Protect log | The sandbox verdict and the action taken on each attachment. | The Mimecast index |
| Audit log | Sign-ins to the Mimecast console and the changes administrators make there. | The Mimecast index |
The SIEM streams (the first three rows) need Enhanced Logging on for each mail direction; with it off, the install succeeds and nothing arrives from them. The three logs need their own product on the API application (step 3): a log the application cannot read is skipped, with a MimecastCG log source not available notification, while the rest keeps arriving. Fluency catches up at most seven days, so a collection gap longer than that is permanent (retention).
What each stream records and depends on, and how the collector reads the APIs, are in Reference.
Before you begin
A Cloud Gateway tenant. This integration targets Mimecast Email Security Cloud Gateway, the MX-record-in-front-of-your-mail gateway, which Mimecast's newer documentation also calls Email Security - MX (the same support articles are served under both names). Email Security Cloud Integrated, the API-attached product that sits behind Microsoft 365 rather than in front of it, is a different product on a different console, with different API products and endpoints.
A Mimecast administrator who can reach Integrations and Account → Roles and can manage API applications and application roles, and a Fluency login with permission to install applications.
Part 1: Mimecast
Work through this half in the Mimecast Administration Console.
1. Turn on Enhanced Logging
Open the Administration menu and go to Account → Account Settings.

Expand the Enhanced Logging section at the foot of the page and tick all three options (Enhanced inbound email logging, Enhanced outbound email logging and Enhanced internal email logging), then Save.

Leaving one unticked silently removes that direction of mail from the feed. Outbound and internal are the ones people skip, and they are what data-exfiltration and internal-phishing detections run on.
Mimecast generates SIEM data only for the log types enabled here, from the moment you save, and makes it available to SIEM integrations about thirty minutes later. With Enhanced Logging off, every later step succeeds, the pipeline reads Running, and only the three logs arrive: no message events ever do.
2. Create the role that scopes the application
The role an API 2.0 application is bound to decides what the credential can read; the application's products (step 3) decide which APIs it can call. Basic Administrator works and is what most integration guides use, but it is broader than this integration needs. To scope it properly, go to Administration → Account → Roles → New Role (Admin Roles on the newer console) and grant read on just these:
| Permission | Why |
|---|---|
| Security Events and Data Retrieval → Threat and Security Events (SIEM) → Read | The SIEM feed itself. Without it no SIEM stream is readable. |
| Monitoring Menu → URL Protection → Read | URL Protect events and the URL Protect log. |
| Monitoring Menu → Attachment Protection → Read | Attachment Protect events and the Attachment Protect log. |
| Monitoring Menu → Impersonation Protection Logs → Read | Impersonation Protect events. |
| Account → Logs → Read | The audit log. |
| Gateway → Tracking → Read | Message tracking detail on the MTA events. |
Grant Read, never All: Fluency only reads from Mimecast, and All on these menus gives the credential the ability to change gateway policy. Save the role; you select it as the Application Role in the next step.
3. Register the API 2.0 application
New applications are created in the Integrations Hub; older consoles still offer the API and Platform Integrations page. Both open the same wizard.
- Integrations Hub (current)
- API and Platform Integrations (older consoles)
Go to Integrations → Integrations Hub, find the Mimecast API 2.0 tile and click Configure New.
If this is the first API application in the tenant, Mimecast shows the API Terms and Conditions first. Read them, tick I accept and click Next; the wizard will not continue until you do.
Go to Services → API and Platform Integrations (on some consoles the menu reads Integrations → API and Platform Integrations), open the Your API 2.0 Applications tab, and click Generate Keys on the Mimecast API 2.0 card.

Existing applications stay manageable here until Mimecast migrates the console, after which its API 2.0 entries disappear altogether. If the tab is not there, this console has already been migrated; use the Integrations Hub tab above.
The wizard runs Disclaimer → Details → Notifications → Summary. On the Details step:

- Application Name:
ingext-mimecastis the name Fluency's own onboarding tooling uses, and is a good default. - Category: SIEM Integration.
- Products: tick all three of these. The list takes several; type part of a name in its search box to find each one, and click Apply:
- Threats, Security Events and Data for CG: the SIEM feed. Required.
- Security Events: the URL Protect and Attachment Protect logs.
- Audit Events: the audit log.
- Application Role: the role from step 2, or Basic Administrator.
- Description: free text.

Fill in the Notifications step with a technical contact and an email address that will still be monitored in two years: this is where Mimecast writes if the application starts failing. Review the Summary and finish with Add and Generate Keys.
Application Name cannot be changed after you save. Products and Application Role can: open the application's Edit option in the Integrations Hub, which keeps the client ID and secret (Adding the logs to an existing application).
4. Copy the client ID and secret
The Manage API 2.0 Credentials dialog appears with both values masked behind an eye icon and a copy button.

The client secret cannot be retrieved after this dialog closes. Losing it means Reset Keys → Regenerate on the application, which invalidates the pair you just created. Put it in a secrets manager, not a document, and do not keep it alongside the client ID.
| Value | Where it came from |
|---|---|
| Client ID | The credentials dialog, Client Id |
| Client Secret | The credentials dialog, Client Secret (shown once) |
Optional: verify the credential before you leave Mimecast
A freshly created application takes several minutes to become usable. Rather than discover that as an install failure in Fluency, exchange the credentials for a token yourself:
curl -s -X POST "https://api.services.mimecast.com/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=<client ID>" \
-d "client_secret=<client secret>"
| Response | What it means |
|---|---|
200 with an access_token field | The credential works. Continue to Part 2. |
401 immediately after creating the application | Almost always the activation delay. Wait a few minutes and repeat. |
401 that persists | A wrong client ID or secret: a truncated paste, or another application's secret. Re-copy, or Reset Keys → Regenerate. |
| A connection failure | Outbound HTTPS to api.services.mimecast.com is blocked from where you ran this. |
A token proves the credential, not what it can read: the Products, the Application Role and Enhanced Logging are only exercised when events are fetched, so a working token and an empty feed are consistent with each other. A missing product shows on Fluency's first poll (Confirm it is running).
Part 2: Fluency
Install the Application
- v2 interface
- Classic v1 interface
In the navigation rail, open Applications and click Install Application, then choose Mimecast CG Events from the Email Audit and Protection category of the Application Catalog.
Go to Platform → Applications → Install Application From Template and choose Mimecast CG Events from the Email Audit and Protection category.
| Parameter | Notes |
|---|---|
| Client ID | From the credentials dialog in step 4. |
| Client Secret | The value shown once. Masked once the application is installed. |
| datalake | Pre-filled managed. |
| datalake index name | Pre-filled Mimecast. Two applications writing to the same index name in the same lake will collide, and the second one aborts. |
- v2 interface
- Classic v1 interface
datalake and datalake index name sit in the collapsed Advanced configuration section below Configuration; click its heading to reach them.
Leave Instance name and Display name at default / Default unless you are installing a second instance (collecting from two Mimecast tenants, for example), in which case give each one a name you will recognise on the applications list, and a distinct datalake index name.

Click Dry run first to have the platform check the credentials before anything is installed, then click Install Application. The Applications page opens with the notice Default is launching., and the new application is listed with a green Running badge once the pipeline is up.
Leave Name and Display Name at default / Default unless you are installing a second instance (collecting from two Mimecast tenants, for example), in which case give each one a name you will recognise on the applications list, and a distinct datalake index name.

Press Install. The application then appears in the Installed Applications view, where its badge reads Running once the pipeline is up.
If you are moving off Mimecast Events (Legacy) and running both templates side by side for a period, give this one a datalake index name the legacy application is not already using: the second application to claim an index name aborts rather than merging into it.
Confirm it is running
- v2 interface
- Classic v1 interface
The application is listed on Applications as Mimecast CG Events, with the display name Default beneath it. Its badge should read Running in green within a few seconds; a red Error badge means the pipeline aborted or reported errors in the last hour. Click its row to open the application details page, which shows any error message beneath the summary figures, the Parameters with the client secret masked, and the Actions the install carried out, including the datalake index the events land in.
The application appears under Installed Applications as Mimecast CG Events: Default. Its badge should read Running in green within a few seconds; Aborted in red means the pipeline stopped on an error. The blue eye button on the card opens the details panel, which carries the error message, the Parameters with the client secret masked, and the Actions the install created, including the datalake index the events land in.
The application polls as soon as it starts and every five minutes after. Its first poll reaches back to the start of the previous day (UTC) for the SIEM streams and 24 hours for the logs, so with Enhanced Logging already on, recent history arrives with it. Each event is filed at the time it happened, so search the past day rather than the last few minutes. Allow up to 30 minutes before treating an empty index as a fault: a new API application takes a few minutes to activate, and Enhanced Logging switched on today adds Mimecast's half-hour lag.
If the application cannot read one of the logs, the first poll raises a MimecastCG log source not available notification naming its API (/api/ttp/url/get-logs, /api/ttp/attachment/get-logs or /api/audit/get-audit-events); the application keeps running and collects everything else (Troubleshooting).
The FACET selector on Datalake Search (v1: the Data Lake → Search facet selector) carries configurations for four of the SIEM streams (Default-Mimecast_MTA_Receipt, Default-Mimecast_URL_Protect, Default-Mimecast_Attachment_Protect and Default-Mimecast_Impersonation_Protect). Every record names its stream in @mimecast.eventType, so a search such as @mimecast.eventType:"audit" in the Mimecast index shows whether a log is arriving (the values are in Reference). See Confirm data is arriving.
Once the badge reads Running, events are in the Mimecast index and no log source not available notification has arrived, setup is complete.
Maintenance
Mimecast does not publish an expiry for API 2.0 client secrets, so rotation is a policy exercise rather than a deadline. The clock that matters is the seven-day window: a rotation or outage finished inside it backfills, and a longer one leaves a permanent gap (retention).
Adding the logs to an existing application
An API application registered with Threats, Security Events and Data for CG alone collects the SIEM streams only. The URL Protect, Attachment Protect and audit logs are skipped, and Fluency sends one MimecastCG log source not available notification naming them. To add them, keeping the client ID and secret:
- Add the read permissions the logs need to the application's role: URL Protection, Attachment Protection and Account → Logs (step 2). Basic Administrator already has them.
- In Mimecast, go to Integrations → Integrations Hub, click View on the Mimecast API 2.0 tile, open the application's options menu and choose Edit. Add Security Events and Audit Events to Products, and save.
- Nothing changes in Fluency. The application checks a skipped log again every six hours; when it can read it, it sends a MimecastCG log source now available notification and collects from 24 hours back.
An application still listed under the older API and Platform Integrations page is managed there. If it offers no way to edit its products, register a new application with all three (step 3) and reinstall with its keys, as for a rotation.
Rotating the client secret
Regeneration is immediate: the old pair dies the moment the new one is issued, so plan for a short collection gap.
- In Mimecast, open the application (Integrations → Integrations Hub → Mimecast API 2.0 → View, or the Your API 2.0 Applications tab on an older console) and choose Reset Keys → Regenerate.
- Copy the new Client Id and Client Secret from the dialog. This is again the only time the secret is shown.
- In Fluency, uninstall the Mimecast CG Events application and install it again with the new pair. Template parameters are read-only after install, so reinstalling is the supported way to change a credential. To uninstall, click Uninstall at the top right of the application's details page (v1: the red Uninstall button at the foot of its details panel on Platform → Applications).
Removing the integration
Uninstall the application in Fluency first, with the Uninstall button at the top right of its details page (v1: the red Uninstall button at the foot of its details panel on Platform → Applications), so the pipeline stops cleanly before its credentials stop working. Then delete the API application in Mimecast, which revokes the credential outright.
Enhanced Logging can be left on; it is an account-wide setting that other integrations and Mimecast's own tracking views also depend on.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The application shows Error (v1: Aborted), or a MimecastCG Init Error notification says it failed to acquire an access token | A wrong or truncated client ID or secret, or an application created minutes ago that has not activated | Wait a few minutes and reinstall; if it still fails, run the token check. |
Running, but no message events (receipt, process, delivery) | Enhanced Logging is off, or was switched on less than half an hour ago | Tick all three options (step 1), save, and wait thirty minutes; nothing before that exists to collect. |
A MimecastCG log source not available notification naming /api/ttp/url/get-logs, /api/ttp/attachment/get-logs or /api/audit/get-audit-events | The API application lacks the product for that log: Security Events (URL and attachment logs) or Audit Events (audit log) | Add the product and the role permission (Adding the logs). Collection starts within six hours. |
| Message events arrive but no URL, Attachment or Impersonation Protect events | The role lacks the Monitoring Menu read permissions, or the tenant has no Targeted Threat Protection subscription | Check the Application Role against step 2, then the subscription in the Mimecast console. |
Users clicked links, but url protect events are rare | The SIEM stream records blocked clicks only | Search the URL Protect log (ttp url), which records every click (streams). |
| A MimecastCG Poll Error notification naming one stream or log | Mimecast refused or failed that request | The other streams keep collecting, and the failed one resumes from its checkpoint on the next poll. If it repeats, check the role (step 2). |
| Inbound mail is logged, internal is not | Only Enhanced inbound email logging was ticked | Tick outbound and internal as well (step 1). |
| Install aborts with an index collision | Another application already owns the datalake index name, commonly a second Mimecast instance | Reinstall with a distinct index name. |
| Collection worked, then stopped | The application was deleted, or its keys were reset in the console | Check the application still exists in the Integrations Hub, then reinstall with the current pair. |
| Everything is configured and the token request itself fails | The client secret was regenerated, or the application's role has since been deleted | Reset Keys → Regenerate, confirm the Application Role still resolves, and reinstall. |
| Events missing for a period longer than a week | Collection was down for longer than Mimecast keeps SIEM logs | Not recoverable from Mimecast (retention). |
Reference
What each stream records and what Mimecast needs in place to produce it, how the records are labelled, and the API mechanics the collector works within, for searches and detection rules written against the Mimecast index.
Streams, what each depends on, and how records are labelled
Every record is stored under @mimecast, exactly as Mimecast returns it plus two fields: eventType, naming the stream, and, on the three logs, timestamp (epoch milliseconds, from the record's date or eventTime), which the SIEM records already carry. @timestamp is the event's own time, taken from that timestamp, so history loaded by the first poll or a catch-up lands at the time it happened; a record without a usable timestamp is stamped with the time Fluency processed it. The pipeline adds @source: mimecast, @sender: mimecast, @eventType: Mimecast and @type: event; @customer is the installed application's integration name (MimecastCG-default for an install named default).
The SIEM types come from Mimecast's SIEM feed. The MTA types describe the life of a message through the gateway; the Targeted Threat Protection types describe what Mimecast's inspection services found.
| Stream | @mimecast.eventType | What it records | Depends on |
|---|---|---|---|
| Receipt | receipt | The MTA accepting a connection for a message: sender, recipient, sending IP, subject, initial verdict. | Enhanced Logging |
| Process | process | Mimecast policy evaluation of that message: which policies matched and what they decided. A message held for a malicious URL shows here (holdReason Url), without the URL. | Enhanced Logging |
| Delivery | delivery | The MTA handing the message to its destination, or failing to. | Enhanced Logging |
| AV | av | Malware verdicts raised during processing. | Enhanced Logging |
| URL Protect | url protect | Clicks on rewritten links that were blocked. | Enhanced Logging; Targeted Threat Protection: URL Protect |
| Attachment Protect | attachment protect | Every attachment inspected, with its hashes, but no verdict. | Enhanced Logging; Targeted Threat Protection: Attachment Protect |
| Impersonation Protect | impersonation protect | Display-name, domain-similarity and internal-name impersonation hits. | Enhanced Logging; Targeted Threat Protection: Impersonation Protect |
| Internal Email Protect | internal email protect | Threats found in internal and outbound mail. | Enhanced Logging; Internal Email Protect |
The three logs come from separate APIs, read by time window. They hold what the SIEM feed leaves out, and they do not need Enhanced Logging:
| Stream | @mimecast.eventType | What it records | Depends on |
|---|---|---|---|
| URL Protect log | ttp url | Every click on a rewritten link, allowed, warned or blocked, and the URLs Mimecast held at delivery. | Security Events product; URL Protection read; Targeted Threat Protection: URL Protect |
| Attachment Protect log | ttp attachment | The sandbox verdict (result) and the action taken (actionTriggered) on each attachment. | Security Events product; Attachment Protection read; Targeted Threat Protection: Attachment Protect |
| Audit log | audit | Sign-ins to the Mimecast console and the changes administrators make there. | Audit Events product; Account → Logs read |
The MTA types are the volume; the Targeted Threat Protection types and logs are the detections. A tenant without a Targeted Threat Protection subscription still gets receipt, process and delivery: the integration installs and runs, it simply has fewer streams to carry.
Two SIEM types are not collected: Spam, one record per message with no verdict (the verdict is in receipt and process), and Journal, journaled copies of internal mail. Audit records keep the signed-in user's IP address inside the eventInfo text rather than in a field of its own.
The seven-day window
Mimecast serves SIEM logs for roughly seven days from the current date, and there is nothing older to backfill from. Fluency catches up the three logs over at most the same seven days, so one rule covers every stream: an outage under a week backfills, an outage over a week leaves a permanent gap. The thirty-minute lag between Enhanced Logging being saved and SIEM data appearing (step 1) comes on top. A credential rotation completed inside the window backfills rather than losing events.
API 2.0: authentication, endpoints and rate limits
One global gateway, no regional base URL. API 2.0 is served from https://api.services.mimecast.com, which routes to the tenant's own region. This is the visible difference from API 1.0, where the base URL was regional (https://us-api.mimecast.com, https://eu-api.mimecast.com and so on) and had to be collected alongside the four keys, and it is why the CG template has two parameters where the legacy template has five.
Authentication is OAuth 2.0 client credentials:
POST https://api.services.mimecast.com/oauth/token
grant_type=client_credentials&client_id=…&client_secret=…
The response carries a short-lived bearer token that is presented as Authorization: Bearer … on subsequent calls and re-requested from the same endpoint on expiry. There is no refresh token.
Two SIEM shapes. Mimecast exposes the same events two ways:
| Batch | Stream | |
|---|---|---|
| Endpoint | /siem/v1/batch/events/cg | The streaming SIEM endpoint on the same host |
| Returns | A pre-signed URL per batch file | Events inline, paged |
| Page size | Whole batch files | 100 events per call |
| Call budget | Suited to full-fidelity collection | 300 calls/hour |
Fluency reads the batch endpoint, which hands back pre-signed URLs to compressed newline-delimited JSON instead of paging 100 events at a time. It asks for each event type in turn and keeps the @nextPage token Mimecast returns as a checkpoint per type, so a restart resumes where the last poll stopped. The first request for a type starts from the previous day (dateRangeStartsAt takes a date, so this is midnight UTC).
The log APIs are POST /api/ttp/url/get-logs, /api/ttp/attachment/get-logs and /api/audit/get-audit-events on the same host, queried by time window and paged with a page token. Each poll asks for the window from 15 minutes before the previous window's end up to five minutes ago, so records Mimecast indexes late are still picked up, and drops the records the overlap returns a second time; identical records are counted rather than merged, because two clicks on one link in the same second are two events. The first poll reaches back 24 hours; after an outage the collector catches up in windows of at most a day, one per poll, and never further back than seven days.
Products are enforced per API. An API the application's products do not cover answers 403 (app_forbidden). For the logs, the collector treats that as the log not being available: it skips it, says so once in a MimecastCG log source not available notification, and tries again every six hours. A 403 from the SIEM feed is an error, reported in every poll's MimecastCG Poll Error.
Rate limiting is per application. Responses carry X-RateLimit-Limit and X-RateLimit-Remaining, and a breach returns 429 with the time until the limit resets in X-RateLimit-Reset, in milliseconds.
Retries and failures. A 429, 503, 504 or other 5xx response, or a network error, is retried up to five times. The collector waits as long as X-RateLimit-Reset or Retry-After asks (whichever is longer), but never more than a minute; without either, it backs off from 2 to 60 seconds. A request still failing after that fails its stream or log for this poll. The others carry on, and the failed one's checkpoint moves only past data that was written, so the next poll resumes from there.
Related
Mimecast documentation
- Managing API 2.0 for Cloud Gateway: the canonical application-creation walkthrough, also published as Managing API 2.0 for Email Security - MX
- The Integrations Hub for Cloud Gateway: the Hub the console is moving to
- Application Management, Jan 2026: the 29 January 2026 move of API 2.0 management into the Hub
- Edit Role and Product Options for Existing API 2.0 Applications, Jun 2026: changing an application's products and role without recreating it
- Manage API 2.0 Credentials, Sep 2023: why the client secret cannot be retrieved after creation
- Mimecast API 2.0, Jun 2023: API 2.0 general availability and the OAuth model
- SIEM API Endpoints, Jul 2023: batch versus stream, and the stream call budget
- SIEM guidelines and API overview: the developer portal reference
Fluency
- Mimecast CG Events install form: the template's fields and defaults (v1: Install Application From Template)
- Confirm data is arriving
Other integrations
- Mimecast (Legacy API 1.0): the API 1.0 template and how to migrate off it
- Email Security integrations: the rest of this category