cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rembis
New Member

Set group image for SP with API fails

Hello,

 

I am trying to change the image of a group by using the REST api for sharepoint.

 

My code fails with the error:

{"odata.error":{"code":"-1, System.Net.WebException","message":{"lang":"en-US","value":"The remote server returned an error: (404) Not Found."}}}
clientRequestId: bdf455c1-da25-433c-9f7a-bf98f0744e59
serviceRequestId: cd4adf9f-006d-3000-1ebd-6cca461ee9f5

 

Below an image about how i builded the request:

 

code.png

 

Is there someone that can help me? I Can't find any solution. I am running another flow where a team is created and i really want to change the picture to the company's logo.

 

Thank you 🙂

 

1 REPLY 1
Expiscornovus
Super User
Super User

Hi @Rembis,

 

What kind of group are you trying to update. A SharePoint Group or a Office 365 Group?

 

If it is the second you could try and use the Graph API instead with an HTTP action and a PUT request:

https://docs.microsoft.com/en-us/graph/api/profilephoto-update?view=graph-rest-beta&tabs=http

 

PUT https://graph.microsoft.com/groups/{id}/photo/$value
Content-type: image/jpeg

Binary data for the image

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,104)