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

Community site session details

Session Id : yQCuoJPfVzAeH1yq6Jb8+6
Power Automate - Using Flows
Answered

Graph API with Teams

Like (0) ShareShare
ReportReport
Posted on 5 Nov 2021 12:33:59 by 144

Hi All,

 

Wondered if you could help me with this strange issue I am getting.

I am using power Automate to update Channel names based on a update to a SQL DB. As there is no built in action to update channel names I am using the Graph API.

 

  • The HTTP PATCH request works fine and the name of the Channel changes successfully.
  • but here comes the strange part, after the Channel name has updated successfully it creates a new folder in SharePoint and links to that folder.
  • I cannot delete that folder after it has been created.
  • I need it to use the existing folder as files will be in there from before the name change.

Here is a preview of Sharepoint, the top folder was created when the Channel was created, the second was created after the flow has ran to rename the channel.

MrDannyHarry_1-1636115620781.png

 

Here is the HTTP PATCH request I am doing:

MrDannyHarry_0-1636115526071.png

 

Am I missing something with the Body of my HTTP request?

Any help is greatly appreciated here.

 

Thanks,

Danny

 

  • Verified answer
    MrDannyHarry Profile Picture
    144 on 11 Nov 2021 at 07:25:37
    Re: Graph API with Teams

    Hi Wearsky,

     

    I managed to sort it in the end. It seemed to be when the team was created it didn't initialise the folder.

    So when I did a rename at that point it initialised it and created a new one with the new name.

     

    We were creating the Channel via Power Automate then renaming using the Graph API.

    What I had to do was do a Graph API GET request to the filesFolder URL, this then initialised the original folder and when we renamed the team it kept this folder instead of creating a new one

    Get filesFolder - Microsoft Graph v1.0 | Microsoft Docs

     

    Cheers,

    Danny

  • v-xiaochen-msft Profile Picture
    on 10 Nov 2021 at 07:02:57
    Re: Graph API with Teams

    Hi @MrDannyHarry ,

     

    I followed your steps and did a test but I didn't encountered the problem.

    I used Http action in flow to create a channel called 'Test100'.

    vxiaochenmsft_0-1636527582721.png

     

    Then I used Http action again to patch this channel to modify its Displayname.

    vxiaochenmsft_1-1636527627511.png

    vxiaochenmsft_2-1636527652756.png

    vxiaochenmsft_3-1636527684884.png

     

    If you create a new file in the existing folder before changing the channel name, will it solve the problem?

     

    Best Regards,

    Wearsky

     

     

     

     

  • MrDannyHarry Profile Picture
    144 on 08 Nov 2021 at 05:48:00
    Re: Graph API with Teams

    Hi Oliver,

     

    I have done some testing and the way I can replicate it is the following:

     

    1. Create New Channel
    2. Rename Channel via the Graph API
    3. Open the Channel Files through teams.

    Doing this seems to create a new folder with the new name

  • OliverR-82 Profile Picture
    615 on 05 Nov 2021 at 19:54:01
    Re: Graph API with Teams

    Hi @MrDannyHarry ,

     

    Are you talking about the folders inside the Documents document library on the connected SharePoint site of the Team in question, where you have a folder for each channel? I cannot reproduce that issue. When I change a channel's displayName using the Graph API like you do, I do not get a new folder. Mind you, I did not actually test this using Power Automate, I just performed the exact same query via the Graph Explorer website

     

    I don't know if anyone else here can reproduce this issue?

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

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!

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

Featured topics

Restore a deleted flow
Loading complete