How to passthru credentials on o365?

I have the following script that maps my OneDrive for Biz and an online Sharepoint library to my Quick Access links in Windows Explorer. The problem is that to get it to work I first have to access those sites using my browser.

We are setup with on-prem AD using AD Connect with passthru credentials. With this setup I just need to open the URL for OneDrive for Biz and the online Sharepoint library w/o having to provide credentials. How can I get the below script to work by passing the user’s credentials?

$site = "\\OURTENANT.sharepoint.com@SSL\DavWWWRoot\sites\oursite\IT"

$site2 = ‘\OURTENANT-my.sharepoint.com@SSL\DavWWWRoot\personal’ + $env:username + ‘_OURDOMAIN_org\Documents’

$QuickAccess = New-Object -ComObject shell.application

$QuickAccess.Namespace($site).Self.InvokeVerb(“pintohome”)

$QuickAccess.Namespace($site2).Self.InvokeVerb(“pintohome”)


        

Here is what I did to get credentials to pass through.

$ie = Start-Process -file iexplore -arg 'https://OURTENANT.sharepoint.com/sites/TEST' -PassThru -WindowStyle Minimized
sleep 15
$ie.Kill()
$ie = Start-Process -file iexplore -arg "https://OURTENANT-my.sharepoint.com/personal/${env:username}_OURDOMAIN_org\Documents" -Passthru -WindowStyle Minimized
sleep 15
$ie.Kill()
$folder = '\\OURTENANT.sharepoint.com@SSL\DavWWWRoot\sites\TEST'
$folder2 = '\\OURTENANT-my.sharepoint.com@SSL\DavWWWRoot\personal\' + $env:username + '_OURDOMAIN_org\Documents'
$QuickAccess = New-Object -ComObject shell.application
$QuickAccess.Namespace($folder).Self.InvokeVerb("pintohome")
$QuickAccess.Namespace($folder2).Self.InvokeVerb("pintohome")