Mapping another users OneDrive
Hello,
We want to use OneDriveMapper to allow user 1 to map user 2's OneDrive folder. User 1 has access to user 2's OneDrive. We configured the $desiredMappings as
@{"displayName"="User2 OneDrive";"targetLocationType"="driveletter";"targetLocationPath"="Z:";"sourceLocationPath"="https://[TENANT]-my.sharepoint.com/personal/[USER2_EMAIL_REPLACING_WITH_UNDERSCORES]/Documents";"mapOnlyForSpecificGroup"=""}
When running the script we get an Edge Window pop up with the user 2's OneDrive files showing. When we check the log files we see the last entry as 02/18/2022 11:25:04 | INFO | Encountered a dialog, showing dialog to user
Checking the url its https://[tenant]-my.sharepoint.com/personal/[USER2_EMAIL_REPLACING_WITH_UNDERSCORES]/_layouts/15/onedrive.aspx
I'm guessing its because the URL's are different, its being picked up by start-AuthCheck.
Any ideas how we can achieve the desired result?
Thanks James