Comments (6)
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.
Hi @dannyfoncke,
I was not able to repro. Bootrapping with isolated sites works for me.
from pnp-auth.
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.
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.
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.
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)
- TypeError: sp.setup is not a function HOT 14
- @pnp v3? HOT 4
- Need for bootstrapping @pnp/sp-taxonomy? HOT 2
- Nodejs app - node 10.15 complaining about JSON and global$1.fetch HOT 7
- Provide custom fetch
- Compilation error HOT 2
- Compilation Errors - @pnp/sp @pnp/pnpjs ^2.0.3 and pnp-auth HOT 3
- Is a version planned with support for pnp/sp v2? HOT 7
- Module not Working with new NodeJS Version 13.2 on TypeScript HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pnp-auth.