Skip to main content
Community site session details

Community site session details

Session Id : FpQq7dAzuEkVdLunrBLS1k
Power Automate - Building Flows
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 22 Apr 2020 16:37:20 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 22 Apr 2020 at 20:40:57
    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 22 Apr 2020 at 20:27:43
    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete