cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MrDannyHarry
Resolver I
Resolver I

Graph API with Teams

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

4 REPLIES 4
OliverR-82
Continued Contributor
Continued Contributor

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?

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

v-xiaochen-msft
Community Support
Community Support

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

 

 

 

 

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

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,711)