Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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": []
    }
  • deanbot88 Profile Picture
    4 on at
    Re: Set Group Image via Flow/Logic Fails with Status 400 Bad Request

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

  • JohnAageAnderse Profile Picture
    1,986 on at
    Re: Set Group Image via Flow/Logic Fails with Status 400 Bad Request

    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

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492