Skip to content

Microsoft Graph API returns hero webpart image inconsistently #10716

@jamesmacwhite

Description

@jamesmacwhite

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions