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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Change Group/Site/Team...
Power Automate
Unanswered

Change Group/Site/Team Logo on Creation

(1) ShareShare
ReportReport
Posted on by 196

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

Categories:
I have the same question (0)
  • rjack Profile Picture
    188 on at

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

  • ThomasDK Profile Picture
    265 on at

    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 😊

  • rjack Profile Picture
    188 on at

    @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. 

  • ThomasDK Profile Picture
    265 on at

    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.

  • rjack Profile Picture
    188 on at

    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

     

  • ThomasDK Profile Picture
    265 on at

    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 (laurakokkarinen.com)

     

  • rjack Profile Picture
    188 on at

    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 | Microsoft Docs 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.

     

     

     

  • ThomasDK Profile Picture
    265 on at

    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)

  • rjack Profile Picture
    188 on at

    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

     

  • jg4dmin Profile Picture
    on at

    Hello, I followed @ThomasDK's way to change a teams logo, but I'm using OAuth authentication and with the bearer token straight in the header just for testing. The flow works fine until the HTTP PUT or PATCH action. I am not sure why it will allways fail with "Internal Server Error", response code 500 and error detail: "Object reference not set to an instance of an object." Am I missing something? Any help appreciated, thank you in advance.

     

    jg4dmin_0-1659559374964.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard