Sharepoint cookies for sharepoint mapping

Daniel Isac 1 Reputation point
2020-08-04T08:40:13.497+00:00

Hello Team,

The online SharePoint document libraries get mapped via Intune script using webdav, however, this works only if the user first opens the SP site in IE (SSO).
A workaround would be to open IE with homepage company.sharepoint.com from Intune, before running the mapping script, but I was wondering if there's a script to get the fedauth cookies from Sharepoint site without opening SP in IE. I believe these cookies expire after 5 days, so they also need to be refreshed. (webclient service is auto and trusted sites for SP and MS are added)

Your feedback is appreciated.
Daniel

PS: I'm aware of Sharepoint libraries available in OneDrive, however the management does not want to have these available offline.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,832 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amos Wu-MSFT 4,051 Reputation points
    2020-08-05T08:56:27.47+00:00

    You could use pnp powershell get SharePoint Online cookie.pnppowershellgetcookie.txt
    Download pnp powershell here

    Or CSOM powershell get SharePoint Online cookie.csompowershellgetcookie.txt

    0 comments No comments

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.