Forum Discussion

oleg_le's avatar
oleg_le
Occasional Reader
Dec 18, 2025

MIP SDK cannot read file labels if a message was encrypted by Outlook Classic.

C++ application uses MIP SDK version 1.14.108. The application does Office files decryption and labels reading. The problem with labels reading is observed.

Steps to reproduce:

  1. Create a docx file with a label which does not impose encryption. 
  2. Open Outlook Classic, compose email, attach the document from 1, click Encrypt, send.
  3. During message sending our application intercepts encrypted by Outlook docx file in temporary folder C:\Users\UserName\AppData\Local\Temp
  4. Application decrypts the intercepted file using mipns::FileHandler::RemoveProtection. Visual inspection demonstrates that decryption runs successfully.
  5. Then a separate FileHandler for decrypted file is created, and mipns::FileHandler::GetLabel() returns an empty label. It means that the label was lost during decryption.
  6. Upon visual inspection of the decrypted file via Word we can see that the label is missing. Also, we do not see MSIP_Label* entries in meta data (File -> Info -> Properties -> Advanced Properties -> Custom).

Here is a fragment of MIP SDK reducted log during file handler creation

=================

file_engine_impl.cpp:327    "Creating file handler for: [D:\GitRepos\ ...reducted]"    mipns::FileEngineImpl::CreateFileHandlerImpl    
gsf_utils.cpp:50    "Initialized GSF"    `anonymous-namespace'::InitGsfHelper    
data_spaces.cpp:415        "No LabelInfo stream was found. No v1 custom properties"    mipns::DataSpaces::GetLabelInfoStream    
data_spaces.cpp:428        "No LabelInfo stream was found. No v1 custom properties"    mipns::DataSpaces::GetXmlPropertiesV1    
file_format_base.cpp:155        "Getting protection from input..."    mipns::FileFormatBase::GetProtection    
license_parser.cpp:233        "XPath returned no results"    `anonymous-namespace'::GetXmlNodesFromPath    
license_parser.cpp:233        "XPath returned no results"    `anonymous-namespace'::GetXmlNodesFromPath    
license_parser.cpp:299        "GetAppDataNode - Failed to get ID in PL app data section, parsing failed"    `anonymous-namespace'::GetAppDataNode    
api_log_cache.cpp:58        "{{============== API CACHED LOGS BEGIN ============}}"    mipns::ApiLogCache::LogAllMessages    
file_engine_impl.cpp:305        "Starting API call: file_create_file_handler_async scenarioId=89fd6484-7db7-4f68-8cf7-132f87825a26"   mipns::FileEngineImpl::CreateFileHandlerAsync    37948
default_task_dispatcher_delegate.cpp:83        "Executing task 'ApiObserver-0' on a new detached thread"    mipns::DefaultTaskDispatcherDelegate::ExecuteTaskOnIndependentThread    37948
file_engine_impl.cpp:305        "Ended API call: file_create_file_handler_async"    mipns::FileEngineImpl::CreateFileHandlerAsync    37948
file_engine_impl.cpp:305        "Starting API task: file_create_file_handler_async scenarioId=89fd6484-7db7-4f68-8cf7-132f87825a26"    mipns::FileEngineImpl::CreateFileHandlerAsync    
file_engine_impl.cpp:327        "Creating file handler for: [D:\GitRepos\...reducted....docx]"    mipns::FileEngineImpl::CreateFileHandlerImpl    
file_format_factory_impl.cpp:88        "Create File Format. Extension: [.docx]"    mipns::FileFormatFactoryImpl::Create    
file_format_base.cpp:363        "V1 metadata is not supported for file extension .docx. Setting metadata version to 0"    mipns::FileFormatBase::CalculateMetadataVersion    
compound_file.cpp:183        "Open compound file for read"    mipns::CompoundFile::OpenRead    
gsf_utils.cpp:50        "Initialized GSF"    `anonymous-namespace'::InitGsfHelper    
compound_file_storage_impl.cpp:351        "Get Metadata"    mipns::CompoundFileStorageImpl::GetMetadata    
compound_file_storage_impl.cpp:356        "No Metadata, not creating GSF object"    mipns::CompoundFileStorageImpl::GetMetadata    
metadata.cpp:119        "Create Metadata"    mipns::Metadata::Metadata    
metadata.cpp:136        "Got [0] properties from DocumentSummaryInformation"    mipns::Metadata::GetProperties    
compound_file_storage_impl.cpp:351        "Get Metadata"    mipns::CompoundFileStorageImpl::GetMetadata    
compound_file_storage_impl.cpp:356        "No Metadata, not creating GSF object"    mipns::CompoundFileStorageImpl::GetMetadata    
metadata.cpp:119        "Create Metadata"    mipns::Metadata::Metadata    
metadata.cpp:136        "Got [0] properties from DocumentSummaryInformation"    mipns::Metadata::GetProperties    

=================

 

No RepliesBe the first to reply

Resources