s-KaiNet / node-sp-auth

Unattended SharePoint http authentication with nodejs
MIT License
137 stars 56 forks source link

OnDemand with Anonymous and ADFS Not Working #132

Open renzska opened 10 months ago

renzska commented 10 months ago

I am using spsave through gulp. I have an on-premise SP SE site that has anonymous access allowed for the default page, but also has the ability to sign in with ADFS to get access to more of the site. When using OnDemand, electron pops up and immediately disappears and I get a "Cookie array is empty" error message. I have tried setting the siteUrl to a page that forces me to login, which prompts for the login, but then gives a different error: "Response code 404 (Not Found)". I'm assuming this errors out because it is not the root of the site. If I disable anonymous access, it works.

I am passing in the following credsentials:

  var creds = {
    ondemand: true,
    force: false,
    persist: true,
    ttl: 60,
    electron: require('electron'),
  }

Is there a way to force a login through ADFS using OnDemand when Anonymous Access is enabled?

Thanks,

John