SharePoint / SharePoint/sp-dev-docs

Microsoft Graph API returns hero webpart image inconsistently

Open
#10,716 6 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Mar 13, 2026.

sharepoint-developer-support type:bug-confirmed
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

SharePoint REST API

Developer environment

None

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details

No response

Describe the bug / error

We have an API query which gets a hero component from a specific SitePage under SharePoint.

Example:

https://graph.microsoft.com/v1.0/sites/$siteId/pages/$pageId/microsoft.graph.sitePage/webParts/$heroComponentId

When getting each tile within the hero, I am finding an inconsistent behaviour with the image data provided for each tile.

More recently, the hero component has background image settings of "Auto-selected image" and "Custom image". I am finding that in some cases when the "Auto-selected image" option is selected, the actual image being returned is what has been set on the Custom Image, even though this not currently set on the hero itself.

It doesn't always happen either, however to fix the issue I need to change the "Custom Image" set even though "Auto-selected image" is selected on the title.

This seems like an API behaviour, given we can't directly influence it via the hero web part settings.

Steps to reproduce

See description of bug/error, as it is more API related.

Expected behavior

The image set on the tile to be returned, rather than an image that exists but it is not set on the tile.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.