Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get SharePoint file content knowing the path using Microsoft.Graph SDK 5.60.0+ #2784

Open
pasqualefloccari opened this issue Dec 29, 2024 · 0 comments
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned

Comments

@pasqualefloccari
Copy link

pasqualefloccari commented Dec 29, 2024

Hi,
I would like to get the content of a file from a SharePoint site knowing the path and I am trying to use this Graph URL:

https://graph.microsoft.com/v1.0/sites/00000000-0000-0000-0000-000000000000/drive/root:/ExcelFile.xlsx/content

I would like to do the same using GraphServiceClient and I have tried different approaches, but Root drive seems inaccessible e.g.

var fileStream = await graphServiceClient.Sites[siteId].Drive.Root.ItemWithPath(filePath).Content.Request().GetAsync();

Could you help me?

Thanks

@pasqualefloccari pasqualefloccari added the status:waiting-for-triage An issue that is yet to be reviewed or assigned label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned
Projects
None yet
Development

No branches or pull requests

1 participant