Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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.
    Aboubakr LACHHAB
    @aboubakr.lachhab_gitlab
    Hi @Burnfireblaze ! I'm facing the same issue, it will be very helpful if you can share the solution.
    Brandt Spangenberg
    @Darkstar69er

    Hi,

    I'm currently trying to develop a electron/typescript application and very new to it.
    Reading through the documentation of you package, it looks like I should be able to handle authentication and requests for on prem severs using 'User credentials through the http ntlm handshake', through this package called 'sp-jsom-node'.
    I noticed the minimal setup section for typescript and made a few alterations. See test code below.

    const authOptions: IAuthOptions = {
      username: 'JohnDoe',
      password: 'S3cureP@ss',
      domain: 'myDomainName'
    };
    
    const authContext: IJsomNodeContext = {
      siteUrl: siteUrl, 
      authOptions: authOptions,
      modules: [ 'core' ], 
      envCode: '2016' 
    };
    
    const ctx = new JsomNode().init(authContext).getContext();
    const oWeb = ctx.get_web();
    const oLists = oWeb.get_lists();
    console.log(oLists);

    I get a error from 'new JsomNode()' within electrons developer tool window that states:

    'Uncaught Error: Cannot find module 'net'
    at webpackEmptyContext (eval at ./node_modules/defaultable sync recursive (app.js:1157:1), <anonymous>:2:10)
    at Object.workaround_require (defaultable.js?6987:49:1)
    at require (defaultable.js?6987:77:1)
    at eval (server.js?663d:9:1)
    at defaulter (defaultable.js?6987:83:1)
    at defaultable (defaultable.js?6987:63:1)
    at good (defaultable.js?6987:174:1)
    at Object.eval (server.js?663d:5:1)
    at eval (server.js:242:30)
    at Object../node_modules/hbo-dnsd/server.js (chunk-vendors.js:3945:1)'.

    I suspect it has something to do with the fact that I'm using Typescript and there's a missing module for NET which might be used within JsomNode?
    I'm not too sure if the issue is with my implementation or just my lack of understanding.

    I'm basically trying to create a authenticated context without using the 'private.json' file and instead using direct user input to the application.

    Andrew Koltyakov
    @koltyakov

    Hey @Darkstar69er,

    JSOM/CSOM is an old API which sometimes is useful for the places where modern API doesn't work or have gaps. But in a usually not needed until you know a very specific case you'd can't managed with REST for example.
    It runs in Node.js environment. You can't run a Node.js code in browser.

    The error is not connected with TypeScript. The message you're getting is Webpack which can't bundle code for browser as it can't find Node.js 'net' and browser is not a server side JS environment.

    In Electron app you should route requests through Electron's backend to make it work.

    Brandt Spangenberg
    @Darkstar69er
    Hi @koltyakov, thank you! I appreciate the response and guidance.
    Fabrício Rocha
    @ffcro3

    Hi Guys, hope you're doing just fine.

    Can you assist me? What i'm missing?

    const listTitle = 'sites';
    
        const request = sprequest.create(credentials);
       let urlTest = 'url';
    
       request.requestDigest(urlTest)
       .then(digest => {
         return request.post(`${urlTest}/_api/web/lists/GetByTitle('${listTitle}')/items`, {
           headers: {
             'X-RequestDigest': digest,
             "content-type": "application/json;odata=verbose",
           },
           body: {
             __metadata: { 'type': `SP.Data.${listTitle}ListItem` },
             Title: 'Test'
           }
         });
       })
       .then((data) => {
         expect(data.statusCode).to.equal(201);
       })
       .catch((err) => {
         console.log(err.message);
       });

    it returns:

    Response code 400 (Bad Request)
    Boon
    @bpsimm

    Hi, I'm noob here. English not my mother tongue. So forgive me if I typo or grammar mistake.
    I am following the tutotial on this page with node.js method for OneDrive business to WebDav
    https://github.com/skleeschulte/basic-to-sharepoint-auth-http-proxy

    So far all npm command already install and apply; but my access to localhost:3000 is failed.

    The things to ask is, I'm totally clueless how to use node-sp-auth as authentication?
    I'm lost with:

    Create authentication headers and perform http request
    Is it a file? Where it should be save? and under what name?

    I don't have experience using node.js ; just pick it up few days ago when I discover the tutorial.

    Hopefully, you guys can answer me. The node.js is running on machine Synology DS916+ DSM7

    Burnfireblaze
    @Burnfireblaze
    @aboubakr.lachhab_gitlab @koltyakov I apologize for this very late response. It was due to the packages I was using, they had some disruption due to the internal modules being used by them. The 2 packages which have collision are snowflake-multisql & sppull, since they had this issue, I moved them to 2 separate functions, after which they were working. So to correct this don't import these 2 modules or such modules together, put them in separate functions or files.
    Burnfireblaze
    @Burnfireblaze
    Hi @koltyakov I have an issue in sppull, sometimes when i pull the files from the sharepoint site, and try to download it to the dlrootfolder specified, instead of downloading to that folder it creates an entire list of folders which follows the sharepoint folder structure and places the file there instead of the actual dlrootfolder path. This is the same code that works for some other files but not for some directories. Any idea what might be the issue here?
    Burnfireblaze
    @Burnfireblaze
    image.png
    Ideally it should be downloaded like this^
    Most of them are
    Burnfireblaze
    @Burnfireblaze
    image.png
    But some of them have these folders created then the file, even though they have the same code & dlrootfolder. Any idea why?
    Andrew Koltyakov
    @koltyakov
    Hey! Sppull recreates the folders structure in most of the cases intentionally and designed for mass download. For a single file scenario sp-download (https://github.com/koltyakov/sp-download) might suit better. Regarding your case, it’s probably a special character in a path. Could you please create an issue in the repo with paths samples so I could take a look and try to repro?
    Burnfireblaze
    @Burnfireblaze
    Hi Andrew, yes I will create an issue
    But you see I cannot use sp-download as this is typescript