Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Graph API with Teams

(0) ShareShare
ReportReport
Posted on 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 at
    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 at
    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 at
    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 at
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow