by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Sergei Sergeev
    @s-KaiNet
    then just install electron 3.x globally and re-initilize sp-rest-proxy with on-demand option
    eralardz
    @eralardz
    I installed it globally, and the warning "Integrated windows authentication isn't supported" is gone, but it still just loads the website
    Sergei Sergeev
    @s-KaiNet
    ok, so it looks like it's an issue with electron and 2fa, I will check it
    eralardz
    @eralardz
    Thanks a lot!!
    Just one more question, I would try to make a really simple react webapp that reads and writes to SharePoint lists from node. I could't find any good examples tho, would you happen to know some?
    Sergei Sergeev
    @s-KaiNet
    if you don't need user context, then you can use add-in only authntication from nodejs and update SharePoint
    eralardz
    @eralardz
    I will check that out
    But I think i will need user context
    Sergei Sergeev
    @s-KaiNet
    in that case maybe for you it's better to use azure ad oauth authentication to establish a user context and get all the data from sharepoint, for example
    https://github.com/AzureADQuickStarts/WebApp-OpenIDConnect-NodeJS
    eralardz
    @eralardz
    Thanks, I will check it out
    Sergei Sergeev
    @s-KaiNet
    but, to be honest, when it comes to development against SharePoint and \ or Office 365, there are a lot more tools and libraries for .net rather then node...
    eralardz
    @eralardz
    Yeah, I'm only starting out. There is so much...
    I've tried SPFX but I've found it to be pretty limiting.
    If you compare it to a SPA
    I'm actually creating an SPA, backed by SharePoint
    ... or trying to ;-)
    Sergei Sergeev
    @s-KaiNet
    if it's spa, consider https://github.com/AzureAD/microsoft-authentication-library-for-js
    msal.js is used to creat spa which are able to use SharePoint api as well
    under the samples folder they have some exmples of applications
    Anuj Kumar Pal
    @Anujkmrpal
    Hi i need help in sppull i am got getting metafileds when query with camlCondition
    Andrew Koltyakov
    @koltyakov
    Hi @Anujkmrpal can you describe your issue in more detail and post with a repro sample in sppull repository project? I'll take a look.
    Anuj Kumar Pal
    @Anujkmrpal
    @koltyakov When i send use only metafileds i get the metadata
    but when i use camlCondition with metaFields i get empty metadata
    1.png
    2.png
    Andrew Koltyakov
    @koltyakov
    Got it. Will take a look later today.
    Anuj Kumar Pal
    @Anujkmrpal
    and also ListItemAllFields is not appeared when using camlCondition
    Anuj Kumar Pal
    @Anujkmrpal
    @koltyakov Is there any hotfix for this. I am in some urgent development
    Andrew Koltyakov
    @koltyakov
    don't use CAML, maybe
    send another request for getting metadata, etc.
    Anuj Kumar Pal
    @Anujkmrpal
    @koltyakov I need to get metadata for the file searched, So if i dont use CAML then i will get all files which use more data, space and time, Is there any other way
    Even if there any way to get ListItemAllFields when using CAML
    Andrew Koltyakov
    @koltyakov
    your query condition is pretty simple why not using restCondition instead?
    Anuj Kumar Pal
    @Anujkmrpal
    @koltyakov can you share any document or example for it
    Anuj Kumar Pal
    @Anujkmrpal
    3.png
    @koltyakov can you tell what is wrong with restcondition in this as the result is not as per restcondition
    Andrew Koltyakov
    @koltyakov
    @Anujkmrpal
    Was able to check and metaFields work together with camlCondition nicely. Regarding restCondition, my bad I've forgotten that I abandoned the idea for bypassing REST conditions (there was an interface for that by no handler).
    But, confirming CAML+Metadata extraction should work just fine.
    image.png
    Anuj Kumar Pal
    @Anujkmrpal
    @koltyakov You Didn't use spDocLibUrl which i think mendatory with camlCondition, So camlCondition didn't work in your case only metaFields works thats why it shows metaData
    correct me if i am wrong
    Andrew Koltyakov
    @koltyakov
    Fair point. Sorry, I missed this out. It was really a bug with getting metadata with CAML, fixed, publishing a version.
    image.png
    Please check with sppull@2.6.1
    Anuj Kumar Pal
    @Anujkmrpal
    @koltyakov Thanks working now
    Andrew Koltyakov
    @koltyakov
    Happy codding!
    paulinedahneaspire
    @paulinedahneaspire

    sp-rest-proxy help please
    I am trying to set up a dev enviroment but cannot get SharePoint Online auth working.
    npm install sp-rest-proxy --save-dev
    server.js
    const RestProxy = require('sp-rest-proxy');

    const settings = {
    configPath: './config/private.json', // Location for SharePoint instance mapping and credentials
    port: 8080, // Local server port
    staticRoot: './static' // Root folder for static content
    };

    const restProxy = new RestProxy(settings);
    restProxy.serve();

    paulinedahneaspire
    @paulinedahneaspire
    when I run npm run serve and enter the SharePoint url, name and password the proxy runs successfully. However when the SharePoint Online project starts up on http://localhost with npm run start I am unable to retrieve the SharePoint Online data. There is no error message - just a progress wheel however when I use the browser inspect tool the first error under the Network tab is
    Request URL: https://xxxxxxxxxxxxxx.sharepoint.com/sites/CMDev/_api/web/currentuser error 403
    x-msdavext_error: 917656; Access+denied.+Before+opening+files+in+this+location%2c+you+must+first+browse+to+the+web+site+and+select+the+option+to+login+automatically.
    The error message is always the same - permission denied. It appears that the SAML token is not being passed through to npm run start
    Andrew Koltyakov
    @koltyakov
    Hi @paulinedahneaspire, in a local workbench you have to route requests not to SharePoint URL but proxy endpoint. http://localhost:8080/sites/CMDev.
    paulinedahneaspire
    @paulinedahneaspire
    Thank you for you very quick reply. So do I need to edit the exportsiteurl.js to point to http://localhost as opposed to https://xxxxxx.sharepoint.com/sites/cmdev ? If so do I include the port :8080 in the exportsiterurl.js ? Thank you
    Andrew Koltyakov
    @koltyakov
    Have no idea what's exportsiteurl.js. Custom config within your particular app I guess. There are two techniques: one is conditionally switching endpoint URL (on localhost condition, similar as this helper does) or providing local server (WebPack Dev server, for instance, has API proxy setting) an extra setting to route to sp-rest-proxy. First one is simpler in configuration, though not so sophisticated as configuring workbench.
    I'm wondering, what's is used for local serve?
    paulinedahneaspire
    @paulinedahneaspire
    Thank you again. As you may have guessed I am not the developer. I am a SharePoint specialist that has been asked to setup a dev environment for a React project that has been developed by consultant that we can no longer get hold of. I am following the instructions he has left but they appear to be lacking