Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Added new flag DisableFormsBasedAuthentication #2068

Closed
wants to merge 2 commits into from

Conversation

lafe
Copy link
Contributor

@lafe lafe commented May 7, 2019

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #808, requires pnp/PnP-Sites-Core#2230

What is in this Pull Request ?

Optionally disables Forms Based Authentication with a new DisableFormsBasedAuthentication flag when using On Prem SharePoint with additional claims providers. This flag sets the X-FORMS_BASED_AUTH_ACCEPTED flag to f, so that forms based authentication is disabled.
This PR requires the Pull Request pnp/PnP-Sites-Core#2230, because for REST based calls, new web requests are constructed in the PnP-Sites-Core project that also need the new flag.

lafe added 2 commits May 6, 2019 15:01
- Disables Forms Based Auth when using On Prem SharePoint with additional claims providers
@CombineLabs
Copy link

I need this for PnP PowerShell 2016 to disable forms based auth. Will this get merged back to the core PnP or do I need to use this branch going forward. I an new to GitHub and and PnP so any help would be appreciated! Thanks in advanced.

@whiplashomega
Copy link

This would fix a major issue for me. I'm attempting to post a file to an on-prem SharePoint site via an automated powershell script, but it is failing because the site in question uses multiple authentication providers. Is there any information on when this might get merged?

@CombineLabs
Copy link

This would fix a major issue for me. I'm attempting to post a file to an on-prem SharePoint site via an automated powershell script, but it is failing because the site in question uses multiple authentication providers. Is there any information on when this might get merged?

I gave up and used the workaround #808

@KoenZomers
Copy link
Collaborator

Sorry @lafe for the delay in getting this looked at. As it is a more drastic code change involving changing PnP Sites Core I would like @erwinvanhunen to make a judgement about this one.

Am I right by stating after examining your PR that this will only fix it for a couple of App PnP PowerShell commands, but using other PnP PowerShell commands would still not work in your Forms Based Auth scenario?

@lafe
Copy link
Contributor Author

lafe commented Feb 1, 2020

Am I right by stating after examining your PR that this will only fix it for a couple of App PnP PowerShell commands, but using other PnP PowerShell commands would still not work in your Forms Based Auth scenario?

If I remember correctly, I implemented it for those commands that are based on APIs that are based on the REST API and which are available in SharePoint 2019. The REST API commands have their own HttpClient which has to include the flag. CSOM based command did not have the issue.

@KoenZomers
Copy link
Collaborator

This issue should be resolved with PR #2571 which solves this in a much cleaner way. Please try it again with that branch or wait for the April 2020 release which will include this PR and try it again. Will close this PR for now assuming it is fixed. If it turns out not to be fixed yet with the April 2020 release, feel free to reopen this PR.

@KoenZomers KoenZomers closed this Mar 13, 2020
@KoenZomers KoenZomers added status:fixed-next-drop Issue will be fixed in upcoming release. and removed Needs: Discussion 🙋 labels Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:fixed-next-drop Issue will be fixed in upcoming release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants