Closed acrovitic closed 4 years ago
Hi @acrovitic, thanks for the good words and using the library.
It can be many factors and difference when accessing SP from within local and external networks. It's better reaching your admins asking what they configured exactly.
Also, it can be proxy settings. In case of Node.js application and network proxy, process.env.HTTP_PROXY, process.env.HTTPS_PROXY, etc. are required to be configured. But I don't think it's your case.
While you know that auth in Python works in both scenarios, it can be something else.
The message you're providing is an ADFS response. Once again it's better to ask admins that that's app you use in Python can authenticate, but another one receives MSIS7068: Access denied
from ADFS. Maybe in an external network, you got to provide 2FA code? Are you able to log in with that account in a browser under the same circumstances?
You can try this helper project for troubleshooting, it not only asks for creds interactively but also outputs a detailed error message if any. And check ADFS or SAML, etc. With SPO it's better using Add-In Only auth though. More about supported auth strategies.
Regarding your sample, it would be faster if to pass explicit objects in a single sppull
session. Authentication can be expensive (1-2 sec), it's cashed, but anyways, strict objects are downloaded effectively. Also, forEach sends all the promises simultaneously which is not always desired.
Going to close this one.
I just want to start out by saying that good lord this module is amazing! When I'm connected to my company's wifi,
sppull
works extremely quickly and is absolutely phenomenal. What takes my current Python ETL script 60-70 seconds,sppull
completes in under 7 seconds. I'd like to switch all of our ETL pipelines over tosppull
if I can get this authentication issue figured out.The issue is that when I try to use the exact same script (and same
config.json
) when not connected to my company's wifi (in this particular case, on a server hosted by Azure), I keep getting the following access denied error:I thought maybe I needed to reform my
siteUrl
to match what my current Python ETL uses for authentication, as the Python ETL works fine on the aforementioned server that's not connected to the company's internet. However, that attempt led to the same access denied error above.I looked into your code and auth examples for any additional options I may need to pass for SAML authentication (company uses what i assume is SAML to enable instant access to any company asset without having to login after logging into your company issued laptop), but couldn't find anything. I'd appreciate any help, as I'm not sure where to even start with this issue. Code is as follows:
config.json
sharepoint_etl.js