1

I maintain a Windows application that uses CSOM to allow users to check values in a SharePoint list and update it if necessary. It had been working fine using only Windows authentication. Recently we switched over to Mixed mode authentication (Windows and ADFS 3.0) and the application stopped working. I can get it to work fine for Windows users by adding the X-FORMS_BASED_AUTH_ACCEPTED header. Unfortunately, I can't get it to work for ADFS users. I can get a SAML token from ADFS, and when I post that to SharePoint I get a FedAuth cookie, so I'm assuming it's authenticating me. But when the application tries to access any kind of user info (for example, siteusers) with the cookie, it throws an Access Denied error. When I try to look at the error in Fiddler I see the following:

X-Forms_Based_Auth_Required: https://<site>/_login/default.aspx?ReturnUrl=/_layouts/15/error.aspx&Source=%2f_vti_bin%2fclient.svc%2fProcessQuery
X-Forms_Based_Auth_Return_Url: https://<site>/_layouts/15/error.aspx
X-MSDAVEXT_Error: 917656; Access denied. Before opening files in this location, you must first browse to the web site and select the option to login automatically.

I've tried everything I can find but I always run into the same error.

1 Answer 1

0

There is a PnP Authentication Manager for authentication, you could check this thread for sample.

2
  • That's basically what I'm doing already; getting the FedAuth cookie and sending that with the web request. But it doesn't work when I try to get any kind of user info.
    – dogwelder
    Commented Aug 15, 2018 at 11:19
  • You could try to use Fiddler to test whether the cookie works for read sample list data, if you could, it would be permission issue.
    – Lee
    Commented Aug 16, 2018 at 6:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.