Skip to content

Draft email inline images duplicated exponentially when adding PDF attachments via Graph API #2937

@GregoryJord

Description

@GregoryJord

Describe the bug

When creating a draft email with a signature containing inline images (e.g., 6 images), the Graph API initially returns the correct number of attachments (6). However, after adding a PDF attachment to the same draft, the API returns duplicated inline image attachments (13 total - 6 original + 6 duplicates + 1 PDF). On subsequent API calls, the inline images continue to multiply exponentially (e.g., each inline image appears 4 times on the next call).

Expected behavior

Initial draft creation: 6 inline image attachments
After adding PDF: 7 total attachments (6 inline images + 1 PDF)
Subsequent API calls should maintain the same 7 attachments without duplication
Inline images should appear only once regardless of how many times attachments are added or the draft is accessed

How to reproduce

Create a draft email with a signature containing 6 inline images
Call Graph API to retrieve attachments - confirm 6 attachments returned
Add a PDF attachment to the same draft via Graph API
Call Graph API to retrieve attachments - observe 13 attachments (inline images duplicated)
Make another API call to retrieve attachments - observe inline images now duplicated more times each
Each subsequent call continues to duplicate the inline image attachments

SDK Version

Latest

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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions