You could use pnp powershell get SharePoint Online cookie.pnppowershellgetcookie.txt
Download pnp powershell here
Or CSOM powershell get SharePoint Online cookie.csompowershellgetcookie.txt
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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.
You could use pnp powershell get SharePoint Online cookie.pnppowershellgetcookie.txt
Download pnp powershell here
Or CSOM powershell get SharePoint Online cookie.csompowershellgetcookie.txt