cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mousman85
Helper IV
Helper IV

Change Group/Site/Team Logo on Creation

Hi,

 

I have a flow that will create a O365 Group and Provision a Team and SharePoint site with it, when a user fills a list in that creates the sites, they can attach an image, this image I'd like to use as the site/team/group logo. But I can't seem to find a way to update this in Flow. 

 

I have tried a few different variations of using HTTP requests, with using POST to _api/groupservice/SetGroupImage I get 400 error, using the _api/Web/SiteLogoUrl and :

 

{"__metadata" : {type: 'SP.Web'}, 'SiteLogoUrl': "/sites/Projects/Lists/Clients/Attachments/161/IMAGE.png"}

 

It succeeds but it doesn't change anything. 

 

Is this possible to achieve using flow and HTTP requests? Any suggestions would be great.

 

Thanks

9 REPLIES 9
rjack
Resolver I
Resolver I

@mousman85 were you able to change the logo using flow? 

ThomasDK
Resolver II
Resolver II

Hi @mousman85,

Like @rjack I also would like to hear if you suceeded in changing the logo? If "yes", then "How?". Please show the solution 😊

@ThomasDK I don't think its possible. did lots of digging into send http request to SharePoint and also to o365 group, it doesnt have an output for logo. i had a brief look into graph, and looks like this feature is not there. will have to look into graph once again. but i believe its not possible as of this moment. 

Thanks for your reply. To my own surprise I managed to solve this. This is what I did:

 

I have a Sharepoint list where I have a Choise attribute called "Ikon" (Danish for Icon) with the choises "i1", "i2" and so on.

In my flow I have used the "Control" called "Switch" to find out which Icon I want to replace the existing with.

In Sharepoint I have a "Shared Documents" library with 4 icons/jpeg-pictures.

"Ikon value" is the value of the Choise attribute in the trigger that triggers the flow when a new row is created in my "Team request" Sharepoint list.

ThomasDK_2-1633424421547.png

 

I have made my flow like this:

ThomasDK_3-1633424455313.png

..and it works like a charm.

Thats awesome! could you please let me know the values of the highlighted expressions?

 

i believe the body is output of your compose i3?

 

rjack_0-1633476593470.png

 

Certainly 🙂

 

ThomasDK_0-1633500817845.png

1: After Team creation I get the ID of the Team/O365 Group, which is the 'targetResourceId' (@{body('Fortolk_JSON_2_(Parse_Team_request)')?['targetResourceId']} ).

Location is: https://graph.microsoft.com/beta/@{body('Fortolk_JSON_(Team_location)')?['location']}

ThomasDK_1-1633501035670.png

 

2: Output is the output of the Composed JSON which is based on the file content (the picture) from the Sharepoint document library. 

ThomasDK_3-1633502168808.png

 

 

3: The 'AuthorizationHeaderValue' is the Oauth2 bearer token refrensed in the header instead of putting it into the body every time. I used this great Blog post to figure out how to do it. Please ask if something dosen't add up.

Calling Microsoft Graph from Power Automate (and other daemon apps) with delegated permissions (laur...

 

Thanks for the input: I took the other approach so a connector is always available to use no matter which flow needs it. Here's the solution to upload image and rename a team or group.

1. Follow Create a Microsoft Graph JSON Batch Custom Connector for Power Automate - Microsoft Graph | Microsof... to create a connector.

2. Add the connector to the flow and use the body on the screenshot to rename a group or a team.

rjack_0-1633562943730.png

3. body in the below to upload a image to a team or a group.

rjack_3-1633563057570.png

4. use Graph Explorer - Microsoft Graph to find if the upload was successful or wait for it to reflect on AAD or O365.

 

 

 

I also considered creating a custom connector. It looks very seamless once created. How do you add it to the flow?

 

I also want to ask you if you have any experience in adding a SharePoint site to a Hub Site? Please see this thread as this problem makes my brain hurt:

Join site hub - Bad Gateway 502 - Power Platform Community (microsoft.com)

here you go! Note: I used the names which are provided in the MS document that i shared. I'm that lazy! lol

 

Regarding hubsite: i'm an amateur when it comes to flow. I'll look into the post and do some test. i joined a site to hubsite without approval process. but if you need approval process, i need to test. 

rjack_0-1633621342484.png

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,137)