web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Set Group Image via Fl...
Power Automate
Unanswered

Set Group Image via Flow/Logic Fails with Status 400 Bad Request

(0) ShareShare
ReportReport
Posted on by 4

Struggling with SharePoint HTTP Request: _api/groupservice/SetGroupImage via Flow/Logic. This request succeeds when run via an spfx site extension (i.e. https://github.com/Puzzlepart/spfx-solutions/blob/master/Pzl.Ext.GroupLogo/src/extensions/groupLogo/GroupLogoApplicationCustomizer.ts#L101).

 

Task: Send an HTTP request to SharePoint

Site Address: https://[tenant].sharepoint.com/sites/[MyTeamSite]
Method: POST
Uri: _api/groupservice/SetGroupImage

Body: [File Content retrieved via 'Get file content using path' task] (looks like "�PNG\r\n\u001a\n\u0000\u0000[...]")

Headers: {

"Content-Type": "image/png",
"Accept": "application/json;odata=nometadata"

}


I'm using a connection user which is an o365 group owner for the group.

Outputs:

 "body": {
        "status": 400,
        "message": "{\"odata.error\":{\"code\":\"-1, System.Net.WebException\",\"message\":{\"lang\":\"en-US\",\"value\":\"The remote server returned an error: (400) Bad Request.\"}}}\r\nclientRequestId: [...]\r\nserviceRequestId: [...]",
        "source": "https://[tenant].sharepoint.com/sites/[MyTeamSite]/_api/groupservice/SetGroupImage",
        "errors": []
    }
Categories:
I have the same question (0)
  • JohnAageAnderse Profile Picture
    1,986 on at

    Hello @deanbot88 

    When you ran it with the spfx site extension, did you use the same image?

    I just wonder, as the spfx site extension states that it accepts JPEG images. No mention of PNG. The API could have that limit - so have you tried with a JPEG image instead?

    Kind regards, John

  • deanbot88 Profile Picture
    4 on at

    @JohnAageAnderse Worth a shot. No change when I tried with a jpg image and image/jpeg content type unfortunately.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 463

#1
Valantis Profile Picture

Valantis 463

#3
11manish Profile Picture

11manish 264

Last 30 days Overall leaderboard