4

Scenario: SharePoint 2013 on-premise, ADFS with SiteMinder. We are running CSOM code from a console application and for authentication we are using: https://msdn.microsoft.com/en-us/library/office/hh147177(v=office.14).aspx#bk_addlresource A WebBrowser object is launched, so we can enter credentials, and when navigation is finished, FedAuth cookie is attached to each ClientContext call.

Problem: after 20 minutes FedAuth cookie expires and access denied is launched. How can we refresh the cookie so we can run a long process (several hours)?

Thanks for your help.

  • Which version of ADFS you are using? When adfs page with login\pass textboxes are opened, is there an option to check "keep me signed in"? – Sergei Sergeev Dec 20 '16 at 14:01
  • I think it is 2.0. "Keep me signed in" is not shown. – Alfonso Dec 20 '16 at 23:40
3

Try to enable persistent SSO for ADFS - Configure Persistent Single Sign-On.

By enabling "keep me signed in" - Set-AdfsProperties –EnableKmsi true you can check box allowing to keep cookie between browser sessions. Later, when FedAuth cookie expires, you can launch WebBrowser object again and this time, since ADFS cookie is persisted, you don't need to type password again.
Downside is that you need to modify organization's adfs settings.

Another completely different workaround is using add-ins and add-in only security. By this way you don't need to enter password at all.
Downside is that you need to configure apps (if not configured).

  • ADFS modificatin is not an option, because as you said organization ADFS settings are modified. Add-ins are not an option too, because is on-premise, so we would need configuration with certificates I think. – Alfonso Dec 21 '16 at 23:47
  • Yes, you need configuration with certificates, but it's not so much work. Apps configuration also involves DNS settings, but since you need only add-in security, you can skip this step. May be you can give it a try. – Sergei Sergeev Dec 22 '16 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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