Giter VIP home page Giter VIP logo

Comments (8)

waldekmastykarz avatar waldekmastykarz commented on July 17, 2024 1

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. 😊

from hack-together.

OzBob avatar OzBob commented on July 17, 2024 1

@waldekmastykarz OBS screen capture uploading

from hack-together.

waldekmastykarz avatar waldekmastykarz commented on July 17, 2024 1

Have you seen this https://learn.microsoft.com/en-us/graph/api/driveitem-list-children?view=graph-rest-1.0&tabs=csharp#list-children-in-the-root-of-the-current-users-drive?

from hack-together.

waldekmastykarz avatar waldekmastykarz commented on July 17, 2024

Awesome! Thank you for your hack!

from hack-together.

OzBob avatar OzBob commented on July 17, 2024

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

from hack-together.

OzBob avatar OzBob commented on July 17, 2024

@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

from hack-together.

waldekmastykarz avatar waldekmastykarz commented on July 17, 2024

@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.

from hack-together.

OzBob avatar OzBob commented on July 17, 2024

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

  1. get the site.Id, from Sites["tenant.sharepoint.com:/sites/clientsite/"]
  2. get the Drive[0].Id from Sites[siteid].Drives -> match on name 'basedrive' to get 'driveid'

My sticking point now is to find the children under the sites\drives\root\

  1. MsGraph Explorer at returns children here ...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

from hack-together.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.