Configured on poll in MS Graph for Office 365 asset. The polling ingested emails and created containers. But artifact was not being created.
There are two types of errors in spawn.log where artifacts were not being created:
duplicate email with same source_data_identifier
"message":"Office365Connector: returned data: {\"failed\": true, \"message\": \"duplicate with source_data_identifier AAMkADI1OTAyY...X8AAA= and asset_id ...\", \"existing_container_id\": 3572707}
The error can be ignored because it is designed to check duplicate emails and not create any duplicate artifact.
key error while processing email data
{"time":"2026-04-28T15:09:15.489013","level":"DEBUG","file":"/srv/phantom/alchemy/spawn3/spawn3.cpp","channel":"daemon","line":427,"ctx_ipc_session_guid":"bea40250-ae83-49c7-9c8d-dd0d8f7474ac","function":"splunk::soar::spawn::ph_ipc::pybind11_init_ph_ipc(pybind11::module_&)::<lambda(const char*)>","pid":1588715,"tid":134501714868544,"cid":0,"service_id":"spawn3","product_version":"8.5.0.243","component":"SPAWN3_13","message":"Office365Connector: Creating email artifacts (/opt/phantom/apps/msgraphforoffice365_0a0a4087-10e8-4c96-9872-b740ff26d8bb/office365_connector.py:1220)"}
{"time":"2026-04-28T15:09:15.490881","level":"ERROR","file":"/srv/phantom/alchemy/spawn3/spawn3.cpp","channel":"daemon","line":435,"ctx_ipc_session_guid":"bea40250-ae83-49c7-9c8d-dd0d8f7474ac","function":"splunk::soar::spawn::ph_ipc::pybind11_init_ph_ipc(pybind11::module_&)::<lambda(const char*)>","pid":1588715,"tid":134501714868544,"cid":0,"service_id":"spawn3","product_version":"8.5.0.243","component":"SPAWN3_13","message":"Office365Connector: Error occurred. Exception: 'body'Traceback (most recent call last): File \"/opt/phantom/apps/msgraphforoffice365_0a0a4087-10e8-4c96-9872-b740ff26d8bb/office365_connector.py\", line 2136, in _handle_on_poll ret_val = self._process_email_data(config, action_result, endpoint, email) File \"/opt/phantom/apps/msgraphforoffice365_0a0a4087-10e8-4c96-9872-b740ff26d8bb/office365_connector.py\", line 1221, in _process_email_data email_artifacts = self._create_email_artifacts(container_id, email) File \"/opt/phantom/apps/msgraphforoffice365_0a0a4087-10e8-4c96-9872-b740ff26d8bb/office365_connector.py\", line 984, in _create_email_artifacts body = email[\"body\"][\"content\"] ~~~~~^^^^^^^^KeyError: 'body'"}
Please check the Microsoft Graph API permissions granted to the app/client used by this asset. If the app may only have Mail.ReadBasic.All, which can read basic email properties but does not include the message body. In that case, the connector may be able to pull the email and create the container, but it would not be able to read full message content for artifact creation.
To fix the second error as above, the app should have Mail.Read application permission.
If Mail.Read has already been granted, please also confirm:
The permission is under Application permissions, not Delegated permissions if the connector is using client credentials.
Admin consent has been granted for that permission if the asset is using client credentials.
| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
01-Oct-2026
|
Initial Release |