GeezerVison is showing github.com — Export result additional options do not accept more than option at the moment · Issue #1393 · microsoftgraph/msgraph-sdk-python
Export result additional options do not accept more than option at the moment #1393DescriptionDescribe the bug
request_body = ExportResultPostRequestBody(
display_name = "Export 4",
export_criteria = ExportCriteria.PartiallyIndexed,
export_location = ExportLocation.ResponsiveLocations | ExportLocation.NonresponsiveLocations,
additional_options = AdditionalOptions.AdvancedIndexing | AdditionalOptions.SubfolderContents | AdditionalOptions.AllItemsInFolder | AdditionalOptions.ListAttachments | AdditionalOptions.TeamsAndYammerConversations | AdditionalOptions.HtmlTranscripts | AdditionalOptions.CloudAttachments | AdditionalOptions.IncludeFolderAndPath | AdditionalOptions.SplitSource | AdditionalOptions.CondensePaths | AdditionalOptions.FriendlyName | AdditionalOptions.IncludeReport,
export_format = ExportFormat.Eml,
)
Looking to set multiple options to additional options here
Expected behavior
request_body = ExportResultPostRequestBody(
display_name = "Export 4",
export_criteria = ExportCriteria.PartiallyIndexed,
export_location = ExportLocation.ResponsiveLocations | ExportLocation.NonresponsiveLocations,
additional_options = [AdditionalOptions.AdvancedIndexing, AdditionalOptions.SubfolderContents , AdditionalOptions.AllItemsInFolder],
export_format = ExportFormat.Eml,
)
How to reproduce
just try setting more than 2 options, it will not work. But works for single option
SDK Version
msgraph-beta-sdk 1.48.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```
</details>
### Configuration
_No response_
### Other information
_No response_
Activityhinchliff commented on Dec 4, 2025 i was just running into the same thing, that all of these Enums are not Flag enums.
but you can set them as strings like this
additional_options = ",".join(
[
"splitSource", # Organize data from different locations into separate folders or PSTs.
"includeFolderAndPath", # Include the folder and path structure of the source.
"condensePaths", # Shorten file paths to fit within 1,024 characters.
"friendlyName", # Give each item a friendly name.
]
)
and .... well, i think that works. priyankarani commented on Dec 5, 2025 No even that didn't work for me. I had already tried that way before posting here, forgot to mention. hinchliff commented on Dec 15, 2025 fyi, i finally got this to work with:
request_body = ExportResultPostRequestBody(
display_name = "Export 4",
export_criteria = ExportCriteria.SearchHits, # might be license issues with partially indexed?
export_location = [ExportLocation.ResponsiveLocations],
additional_options = [AdditionalOptions.SplitSource, AdditionalOptions.IncludeFolderAndPath, AdditionalOptions.CondensePaths, AdditionalOptions.FriendlyName],
export_format = ExportFormat.Pst,
document_version = DocumentVersion.Latest,
)
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|