Open OzBob opened 1 year ago
Awesome! Thank you for your hack!
Hey @OzBob, would you mind recording a short video walkthrough of your hack? Any format will work. It's not required for the hackathon but it would help us showcase your work both internally at Microsoft and publicly in the community. 😊
first attempt at OBS screen capture 2nd vid with a working example of listing sites, despite the MSGraph explorer not listing sites. it will also include a debug view of the site\drives endpoint call: https://github.com/OzBob/hack-together/blob/ozbob/dev/src/SharepointFileSystem/0Console/Experiments/SharepointExamples.cs#L41 and the drive{id} endpoint blank result.https://github.com/OzBob/hack-together/blob/ozbob/dev/src/SharepointFileSystem/0Console/Experiments/SharepointExamples.cs#L55 2023-03-15 20-39-17ScreenCapture.zip
@waldekmastykarz OBS screen capture uploading
@waldekmastykarz / community can I please ask for some help on how to query msgraph 'sites' using dotnet client when query is: ...sites/{siteid}/drives/{driveid}/root:/BaseDocuments as per @PaoloPia' example here https://youtu.be/rjZnuuKQu3c?t=247
@OzBob, could you please elaborate a bit what you'd like to achieve? In your question you're referring to sites but then sharing the API URL to a document library.
Thanks @waldekmastykarz! Much appreciated.
My project is to 'Copy a local folder up to Sharepoint'. Starting with a single file C:\BaseDocuments\folder\subfolder\file.docx Check Sharepoint to see if it exists. Upload it or update it into Sharepoint at: clientsite\basedrive\BaseDocuments\folder\subfolder\file.docx
I used Paolos on Youtube to guide me how to get the Graph Explorer REST endpoints working, but I am still not getting the msgraph dotnet client to work.
I have used the MSGraph Client to
My sticking point now is to find the children under the sites\drives\root\
...sites/{siteid}/drives/{sdriveid}/root:/BaseDocuments
How do I write that in C#? I'm using this to get the Children 'folder'
var rootWithChildren = await graphClient
.Drives[drive.Id]
.Root
.GetAsync(requestConfiguration => {
requestConfiguration.QueryParameters.Expand = new string[] { "children" };
});
var firstRootWithChildrenId = rootWithChildren[0].Id
var BaseFolder = await graphClient
.Drives[siteDriveid]
.Items[firstRootWithChildrenId]
.GetAsync();
Once I get to the child document 'file.docx' I'll start researching bulk upload/download as some docs will be bigger than 4MB
Project name
msgraph-sharepoint-filesystem-deamon
Description
On the 'dev' branch
This is a deamon app sample that will connect to the MSGraph using the dotnet sdk, it will allow an authorised application to manage a file system drive in sharepoint, with the following methods on the interface
IFileSystem
:Repo URL
https://github.com/OzBob/hack-together/tree/ozbob/dev
Team members
OzBob