Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Burnfireblaze
    @Burnfireblaze

    This is the code I used:
    const { SPPull } = require('sppull');

    const context = {
    siteUrl: "http://contoso.sharepoint.com/subsite",
    creds: {
    username: "user@contoso.com",
    password: "Password",
    online: true
    }
    };

    const options = {
    spRootFolder: "Shared%20Documents/Contracts",
    dlRootFolder: "./Downloads/Contracts"
    };

    /*

    • All files will be downloaded from http://contoso.sharepoint.com/subsite/Shared%20Documents/Contracts folder
    • to __dirname + /Downloads/Contracts folder.
    • Folders structure will remain original as it is in SharePoint's target folder.
      */
      SPPull.download(context, options)
      .then((downloadResults) => {
      console.log("Files are downloaded");
      console.log("For more, please check the results", JSON.stringify(downloadResults));
      })
      .catch((err) => {
      console.log("Core error has happened", err);
      });
    As given in sp pull library example
    Burnfireblaze
    @Burnfireblaze
    Screenshot (535)_LI.jpg
    This is the error^
    Any help from anyone would be appreciated
    Burnfireblaze
    @Burnfireblaze
    @koltyakov Anything which would help me?
    Burnfireblaze
    @Burnfireblaze
    I need to get the files in the folder in sharepoint and display them for download in react front end
    Burnfireblaze
    @Burnfireblaze
    tried sp-download but couldn't make it work
    I have solved the above error in the image, but no files are downloading, its 0 out of 0 always
    Burnfireblaze
    @Burnfireblaze
    Any proper examples for sp-download?
    other than the npm examples
    Andrew Koltyakov
    @koltyakov

    Hi @Burnfireblaze,

    Thanks for the interest in the libraries.

    This is the error^

    This looks as if you were provided a wrong creds or a wrong strategy.
    Is it SharePoint Online or Onprem?

    sp-download examples

    https://github.com/koltyakov/sp-download#minimal-setup-typescript

    It's just it. There could be no other examples. sp-download is a bare minimal one use case lib and cli.
    In tests, there is a bit more, https://github.com/koltyakov/sp-download/blob/master/test/integration/tests.spec.ts, yet in terms of examples it's the same exactly pattern.

    sppull

    The different examples can be checked in the manual tests https://github.com/koltyakov/sppull/tree/master/test/manual
    Or in integration tests.

    While you're experiencing the issues with a straightforward scenario which just works for others, my guess you're providing a wrong path to site or folder or file, or wrong creds or strategy.

    Please check this wiki for the auth strategies https://github.com/s-KaiNet/node-sp-auth/wiki

    I'd suggest separating a possible issues by checking auth first - https://github.com/koltyakov/node-sp-auth-troubleshoot - this project setup allows quickly check if auth works. Don't try populating config manually, but use the wizard and then check what the private.json ended up with.

    Burnfireblaze
    @Burnfireblaze
    And is there anyway to get the names of files inside the folder?
    Andrew Koltyakov
    @koltyakov
    mmorandini
    @mmorandini
    Hello everyone, I have been experiencing a strange issue with the node-sp-auth package and I am hoping to get some help here hopefully.
    The issue is that when calling the getAuth() with client_id and client_secret only, everything seems to be working ok (in that I don't get any errors back), but when the promise resolves, the access token comes back as undefined, so the "headers" object looks like this: {'Authorization': 'Bearer undefined'}.
    Do you have any idea as to why this could be happening? Also worth mentioning that I have been observing this behavior only since yesterday, and that my integration was working fine before.
    Andrew Koltyakov
    @koltyakov
    Hi @mmorandini, did you prolongate the add in? By default an add-in registration is actual per a year, then needed secret update.
    mmorandini
    @mmorandini
    Hi @koltyakov, I didn't and this could be te case actually. I'll look into that. The thing that scared me was not receiving any errors back. I'll let you know how it goes :)
    Rushabh Wadkar
    @rushabh_wadkar_twitter
    Hello guys! I have a problem statement where I want to upload a file to company's sharepoint and also retrieve the public url of that file using node/python. Can anybody suggest me how to achieve this ? I tried reading the docs but didn't understand it. It would be great if someone points me to the right direction. Thanks :)
    Rushabh Wadkar
    @rushabh_wadkar_twitter
    I tried spsave but it isn't working properly. getting this error - " spsave: Error: No XML to parse!" Please help!
    Burnfireblaze
    @Burnfireblaze
    Hi @koltyakov I have an urgent need. Are there any npm modules to rename a folder?
    on sharepoint
    would spsave or sppurge or sppull or any oher modules work?
    Andrew Koltyakov
    @koltyakov
    A raw query via sprequest or PnPjs
    Burnfireblaze
    @Burnfireblaze
    HI Andrew but am not aware of the exact process, do you have any documentation?
    Can you please elaborate what I should do??
    Andrew Koltyakov
    @koltyakov
    https://github.com/SharePoint-NodeJS/pnp-auth - how to authenticate in Node.js environment
    Vaji95
    @Vaji95
    Hello, everyone.
    I have to create a react native app with which I can upload files to sharepoint 2019. Sharepoint is authenticated with adfs.
    the user must be able to authenticate himself with adfs in my app. is that possible? if so, do you know any documentation or a tool?
    Danny Foncke
    @dannyfoncke
    Hi all - I wonder if(how) I could get following scenario to work:
    context:
    • user is on local pc in browser logged on to SP2019 onprem (ADFS)
    • in SP page a js script connects to a nodejs api
      question(s)
    • Can the js script pass the user authentication to nodejs ?
    • Can nodejs check the authentication with SP ?
    casperan
    @casperan
    any sharepoint developers here ???
    is there anything Mac + Visual Studio Code + SharePoint Framework cannot do in terms of developing SharePoint Add-ins compared to Windows + Visual Studio + Microsoft Office Developer Tools for Visual Studio. ???
    Burnfireblaze
    @Burnfireblaze
    Hi Andrew, I am really grateful to you for developing spsave, sppull, and sppurge, using this modules I was able to establish a full stack solution for uploading files to sharepoint with ease. I was just an intern and now I have received a good job offer, your modules helped a lot.
    The full stack project I did for the company was solid and liked by the team a lot
    Thank you for helping me out also when needed in this chat, really appreciate the work.
    to andrew and others involved in these modules
    Andrew Koltyakov
    @koltyakov
    Thank you @Burnfireblaze! P.S. spsave is created by @s-KaiNet not me :)
    Burnfireblaze
    @Burnfireblaze
    Oh @s-KaiNet thanks a lot too!
    Burnfireblaze
    @Burnfireblaze
    Hi Andrew I am facing an issue in SP Pull, any idea what could be causing this:
    Core error has happened GotError: connect ECONNREFUSED 127.0.0.1:443
    at onError (C:...\node_modules\got\dist\source\request-as-event-emitter.js:140:29)
    at handleRequest (C:....got\dist\source\request-as-event-emitter.js:173:17)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16) {
    name: 'RequestError',
    code: 'ECONNREFUSED'
    }
    The credentials seem to be fine and the links seem to be fine
    Andrew Koltyakov
    @koltyakov
    Hey! ECONNREFUSED is when Node.js process can’t physically reach an address.
    Could be because of enterprise proxy for instance.
    Burnfireblaze
    @Burnfireblaze
    I have seen this, could this be an issue, and any way to resolve this?
    I am using Azure functions basically
    Burnfireblaze
    @Burnfireblaze
    Andrew any way to overcome this? I am unable to use sppull in serverless azure functions.

    sindresorhus/got#951

    This is an exact replication of the error

    Burnfireblaze
    @Burnfireblaze
    Ok Solved it was a simple issue
    Andrew Koltyakov
    @koltyakov
    What was it? Might be helpful for others if faced the same issue.