Skip to content

Export result additional options do not accept more than option at the moment #1393

Open

Description

@priyankarani

Describe 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_

Activity

  1. hinchliff commented on Dec 4, 2025

    @hinchliff

    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.

  2. priyankarani commented on Dec 5, 2025

    @priyankarani
    Author

    No even that didn't work for me. I had already tried that way before posting here, forgot to mention.

  3. hinchliff commented on Dec 15, 2025

    @hinchliff

    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,
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugA broken experiencetype:investigationInvestigation work, output should be a document detailing findings or a prototype

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions