Code Monkey home page Code Monkey logo

Comments (6)

koltyakov avatar koltyakov commented on June 19, 2024

Thanks @dannyfoncke,

We'll take a look. Isolated environments are relatively new and something might be at edge of PnPjs & the auth library. However, messages out of the sphttpclient don't look so good to me.

from pnp-auth.

koltyakov avatar koltyakov commented on June 19, 2024

Hi @dannyfoncke,

I was not able to repro. Bootrapping with isolated sites works for me.

from pnp-auth.

dannyfoncke avatar dannyfoncke commented on June 19, 2024

Thanks for investigating @koltyakov

Can the fact that I'm using add-in creds have something to do with it ?
Also I'm targeting SharePoint 2019 on-prem
(I probably should have included that in my question - sorry)

from pnp-auth.

koltyakov avatar koltyakov commented on June 19, 2024

It might be. I've tested user creds to two different SPO tenants.
Have no On-Prem with Add-ins model enabled to check if it's the case.

Can you try if a different auth strategy fails the same for you?
I also used PnPjs v2.7 not 2.6.

from pnp-auth.

dannyfoncke avatar dannyfoncke commented on June 19, 2024

Sadly upgrading to v2.7 has not resolved the issue

Trying a different auth strategy will take a bit more doing
(Also it will need to be done targeting SP2013)

from pnp-auth.

dannyfoncke avatar dannyfoncke commented on June 19, 2024

Hello

Update : it seems to be working in version 2.8 with some issues down the line.

Straightforward creating an isolated sp object and using it works in like "isolatedsp.web...." expressions
(I'm on SharePoint 2019 onprem, use add-in creds and the pnp-auth/node-sp-auth-config combo)

Starting from a default created isolatedsp object (no configuration options), this scenario, taken from the pnp documentation, however does not :

const file = await isolatedsp.web.getFolderByServerRelativeUrl("/sites/dev/Shared%20Documents/test/").files.add("file.name", "file", true);
const item = await file.file.getItem();
await item.update({
  Title: "A Title",
  OtherField: "My Other Value"
});

The statement : isolatedsp.web.getFolder...... works
The statement : file.file.getItem() works
The statement item.fileupdate... fails with a TypeError: safe_global_js_1.safeGlobal.fetch is not a function

Thanks again for the work provided on pnp and related libs.

from pnp-auth.

Related Issues (10)

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.