How to access sharepoint pages by authenticate using ADFS token - powershell or c# - On Premises

S, Vijaivel (Cognizant) 0 Reputation points
2020-09-21T21:35:55.883+00:00

Hello,
I have a requirement to warmup my SharePoint sites using PowerShell. My PowerShell script was running good the way of authentication using FEDAuth cookie using Invoke-webrequest & response. Now ADFS implemented their new changes (Self service way of authentication using access token)

Now recommended to get the ADFS token using client ID, secret key, resource Uri, etc and to get authenticate to SharePoint pages. I have the token (bearer) and tried to use it to get authenticated but getting 401 un authorized access.

Can anyone please suggest how to implement my warmup script in SharePoint 2016 On premises environment?

Thanks
Vijaivel S

Active Directory Federation Services
Active Directory Federation Services
An Active Directory technology that provides single-sign-on functionality by securely sharing digital identity and entitlement rights across security and enterprise boundaries.
1,277 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,624 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,575 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.