I cannot seem to remotely authenticate via a REST API script for a SharePoint 2016 on premise installation that is using ADFS for authentication.
In my case, I am using remote queries using SharePoint REST API with activating the Cross domain and using ADFS to connect the SharePoint Sites.
What I get is, If the user is already connected to the remote site (session open) the REST API request will be done successfully, if the session is closed the REST API query send me:
"access denied " error
In fact the site which is using to do all my REST API queries is using ADFS also, so the token is there.
So is there any way that I can pass the token with REST API, to a way to open session for user in the other sites without pushing the user to set his login and password?