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

Microsoft Security Active Directory Federation Services
Microsoft 365 and Office SharePoint Server Development
Windows for business Windows Server User experience PowerShell
{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.