Is there any alternative to the Sharepoint Get-Content options? I have files in a microsoft teams channel which I need to email, but I can't use sharepoint for security reasons, is there a Graph call or any other way to get the file content?
Hi @bcampbell13 :
Do you want to get files from microsoft teams channel and send them via email?
I am afraid there is no other way, because In fact, the files in the message are stored in SharePoint Library.
Teams group will generate the SharePoint Site group and store the files in Shared Document. Each Channel has a corresponding folder.
I think this link will help you a lot:
In addition, you can download the file and save it in OneDrive, and then use OneDrive's related actions to get the file content.
Let me clarify, Teams (Sharepoint) is fine to hold the data. What I'm doing is creating an excel file from data and then attaching it and sending the file. I use Microsoft Graph calls to create the excel, write all the data, which works great and it's stored in the teams channel. The only problem is, that one call to get the file content (file) to attach it to the email, can only be done with the Sharepoint Connector: Get File Content. My users can't have access to sharepoint, so I can not use that connector.
Is there a way to get the file content through microsoft graph or can I make the sharepoint call via RestAPI so it does not need the connector?
All I need is some way to access the file to get it's content, which is not the sharepoint connector.
Hi @bcampbell13 :
I'm afraid that is not available.If the user does not have access to the SharePoint Site ,then he can not obtain the file in the SharePoint Site.
If the user can not get the files in the channel from SharePoint, I think the only way is to capture the attachments in the message in real time when the message in the channel is created.I think this link will help you a lot:
This case uses the "When a channel message is created" action to capture the newly created message in the channel, and then get the attachment in the message. on your side, then you can use OnDrive to create and save files.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.