by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    above-average-developer
    @above-average-developer
    I can authenticate with no issue and I can retrieve lists and libraries. I just can get the page HTML for scraping like I could in SP2013.
    • can't
    Andrew Koltyakov
    @koltyakov
    Add-in Only auth is limited with API consumption only, you can't use it for requesting a page content.
    above-average-developer
    @above-average-developer
    @koltyakov , that's exactly what I needed to know. Thank you!
    shoaib0077
    @shoaib0077
    Hello, I am having some issue with types i think. I am trying to set the style of an html element through reactdom and i know it should work but givng me the following error
    image.png
    Alex Lee
    @alexleely
    Hi hi, I am current using SPPP to create a react app on SharePoint 2016 on premise. The SharePoint site is on HTTPS. Can I check is it possible that the react app can be served thru HTTP2 protocol or it is a SharePoint Limitation due to Windows authentication that on application on Sharepoint is defintiely on HTTP1.1? Sorry if my question may be incorrect. Thanks in advance .
    Andrew Koltyakov
    @koltyakov
    Hi @alexleely, can you elaborate? Do you need to start local workbench on HTTPS? Yes, this is possible, internally local server is started using webpack dev server it can be provided with http2, https certs configuration (https://webpack.js.org/configuration/dev-server/#devserverhttp2) (will copy a setup semple below). Regarding HTTP2 do you really reference to SPDY? SPDY won't work in SP with NTLM or Kerberos authentications.
    image.png
    Alex Lee
    @alexleely
    Hi @koltyakov , thank you do much for the guidance and sorry for so unclear in my questions as I am new to node, react, SPPP.
    Alex Lee
    @alexleely
    1. Yes, would like to run Local WorkBench on HTTPS. I am trying it out now but hit a bit of problem and trying to figure out
    Alex Lee
    @alexleely
    1. I was just aware of HTTP2 and HTTP 1/1. If my SharePoint sites is in HTTPS and my app is deployed in the sites, does it automatically serve as HTTP2 or it will be HTTP 1/1? Based on testing, it i still serving as HTTP 1/1 in chrome browser but in Edge some pages are in HTTP 2 and some are in HTTP 1/1.
    1. The reason for check ing on HTTP2 is that we hope to further improve the performance for pages. It has improved since we use your SPPP as previously was SSOM. But was thinking if HTTP2 will be even faster.
    Alex Lee
    @alexleely
    image.png
    I am able to run local workbench in https
    thanks so much
    Alex Lee
    @alexleely
    Hi @koltyakov, do you have any example on SPPP deployment thru Azure Dev Ops or I can follow the same as the following for SPFX : https://www.rbaconsulting.com/blog/tutorial-implementing-a-ci-cd-pipeline-for-your-spfx-projects-in-azure-devops/?
    Andrew Koltyakov
    @koltyakov
    Hi @alexleely, how about npm run build then npm run publish with environment variable for authentication (https://github.com/koltyakov/node-sp-auth-config#environment-variables). Please leave an issue with the request to add Azure DevOps sample in the repository I’ll add a generic sample, but it’s really just binding env vars for auth (making sure prod mode is on) and the ordinary frontend project pipeline actions specifics.
    Alex Lee
    @alexleely
    Hi @koltyakov , thank you so much!
    Andrew Koltyakov
    @koltyakov
    Alex Lee
    @alexleely
    Hi @koltyakov , thank you once again for coming up with the sample! It is great!
    shoaib0077
    @shoaib0077
    Hello Guys, I am filtering from an object array using multi select dropdown of officeuifabric. Following is the example
    universalFilter= AllNews.filter((
    { AuthorName}) =>
    selectAuthors.includes(AuthorName))
    Now when Selected Authors(Multi Dropdown) is null, It doesnt bring any result but i want all items without filtering on Author when selectAuthor is null.
    Bruno Naibert
    @bruno-naibert
    how do I upload a file to the sharepoint without publishing it using spsave? I tried checkin: false but got errors on the console. I would like to upload files and make them visible only to my user
    image.png
    Andrew Koltyakov
    @koltyakov
    Hi Bruno, did you try changing checkinType? https://github.com/s-KaiNet/spsave#core-options
    Bruno Naibert
    @bruno-naibert
    @koltyakov
    I got it, thank you. Greetings from Brazil.
    Andrew Koltyakov
    @koltyakov
    👍
    Alex Lee
    @alexleely

    Hi @koltyakov ,

    I am having some issues on the establishing connection

    Below is the code I am using

      # Creating private file from multiline variable from matrix
       # Encoding secrets in private file
    - script: |        
        touch ./config/private.json && cat <<EOF > ./config/private.json
        $(private.json)
        EOF        
        SPAUTH_ENV=production gulp config
      displayName: 'Establishing connection'

    The error is showing:

    << was unexpected at this time.

    [error]Cmd.exe exited with code '255'.

    image.png

    I am not sure if it is due to my private.json?

    Thank you

    Andrew Koltyakov
    @koltyakov
    Cmd.exe, windows runner! That part should be aligned with cmd if you’re really need a windows runner. The scripts in the pipeline sample are in bash. Why to use win when you can use a linux? :D
    Alex Lee
    @alexleely
    Hi Andrew, thank you so much, i will try to see if I can change it to windows cmd. I am actually using my on premise server for the CI/CD as it is in my company network
    thanks once again
    Alex Lee
    @alexleely
    Hi Andrew, I just understood what you meant that on using linux. I managed to run the pipline but i still hit an while publishing to sharepoint
    image.png
    Could it be because my sharepoint server is behind firewall?
    HassanNawaz285
    @HassanNawaz285
    Hi @koltyakov i faced problem in my spfx webpart is that i am using the pagination component of Pnp controle is that <Pagination currentPage={3} totalPages={13} onChange={(page) => this._getPage(page)}
    limiter={3} // Optional - default value 3
    hideFirstPageJump // Optional
    hideLastPageJump // Optional
    limiterIcon={"Emoji12"} // Optional
    />
    @koltyakov the problem is that when i use static value in total page it works fine but when i used dynamic value its not works fine that when i filter items on base of Props the Component called but it will not update the total pages but when i reload the page then it will change.
    Andrew Koltyakov
    @koltyakov
    That’s great @HassanNawaz285, but how your question is connected to me or relates to this channel? I’m not involved into controls project at all. Please ask a question in a corresponding repo, that would be more effective and correct. :D Rather than bombarding me with DMs on things which I have no direct connection to.
    shoaib0077
    @shoaib0077
    @koltyakov Sorry, i told @HassanNawaz285 to ask this question in this group as i got some good recommendations from you in the past. I apologies for bombarding you with DMs. We both are looking to solve this issue with PNP Pagination. I will try to find the right group for that. Sorry to bother you. Have a great day.
    mctoastus
    @mctoastus

    Hey!
    I just started out using your amazing package.
    Now im having a problem:
    I wanted to go through your samples, and it worked fine till i wanted to create a list item.

    Here is my Code: https://i.imgur.com/bxYWB1g.png

    I get the following Error: HTTPError: Response code 400 (Bad Request)
    at EventEmitter.<anonymous> (C:\Users\mathe\source\repos\CryptoChat\node_modules\sp-request\node_modules\got\dist\source\as-promise.js:118:31).

    Also im really new to nodejs (?and rest?). So if i want for example to read out the number of list items for example. Where can i find the headers i need for that etc?

    Im happy for every response!
    Sincerly Matheo

    Andrew Koltyakov
    @koltyakov
    @mctoastus, please try adding Content-Type=application/json header and JSON.stringify the body.
    KaianFerreira
    @KaianFerreira
    Hello.
    I am working on a project that uploads files to a folder that is on the sharepoint. The only way to login is through a link that I open and enter a password. How do I do this authentication via node-sp-auth?
    Obe Lahnkara
    @Oberothton_twitter
    Greetings all. I've been trying to setup Sharepoint authentication in Node.js, and despite trying several different methods (node-sp-auth, pnpjs) I'm having all kinds of errors. on the node-sp-auth side, I keep getting an 'invalid argument' error from my type2message response, despite using what i think are the correct credentialoptions. PnP isn't working either, 'cannot read property filter of undefined' and honestly I'm not even sure about the nature of this error. if i'm using Sharepoint On-Prem 2013, where I normally log in automatically with AD, what's the proper library and credential options to use to get the form digest for POST requests?
    Andrew Koltyakov
    @koltyakov
    @Oberothton_twitter, you can node-sp-auth for authentication in on-prem, there are no other alternatives in Node.js, at least I don't know about such. The simplest way of consuming the API without caring too much about headers and digest is PnPjs. With node-sp-auth it can authenticate to on-prem as well. pnp-auth simplifies binding auth fetch client to PnPjs.
    As you experience authentication issues while node-sp-auth supports NTLM&NTLM2, that means that your environment configured with different authentication or auth parameters are provided incorrectly. I'd suggest troubleshooting with this helper repo first.
    Obe Lahnkara
    @Oberothton_twitter
    can pnp not authenticate on-prem on its own? because I've been trying to use it and keep getting some kind of deeply nested json endpoints filter error I don't understand. Meanwhile, I cloned and ran your troubleshooter using the NTLM creds I was before (which should still be the correct domain name, user, password)
    === Error ===
    Error: Invalid argument
    at Object.decodeType2Message (C:\Users\XXX\Documents\ReactTesting\node-sp-auth-troubleshoot\node_modules\node-ntlm-client\lib\ntlm.js:62:9)
    at C:\Users\XXX\Documents\ReactTesting\node-sp-auth-troubleshoot\node_modules\node-sp-auth\lib\src\auth\resolvers\OnpremiseUserCredentials.js:40:35
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async C:\Users\XXX\Documents\ReactTesting\node-sp-auth-troubleshoot\index.js:22:24
    Andrew Koltyakov
    @koltyakov
    What’s the version of Node.js? The latest node-sp-auth update requires at least 10.19.
    Are you sure, your environment is NTLM? But not ADFS or something else? Can it be a mixed auth?

    can pnp not authenticate on-prem on its own?

    Sure thing, no.

    Andrew Koltyakov
    @koltyakov
    Also, what’s the finger print of username/domain? Should be 1) username: john@contoso.com, domain: omitted; 2) username: contoso\john, domain: omitted, 3) username: john, domain: contoso
    However, messing up with creds format would end up with incorrect username and password. So it’s something else.
    Obe Lahnkara
    @Oberothton_twitter
    i've been doing username, password, domain