When a deleted OneDrive is restored then its also important to give access to some user. The easiest way to restore a deleted OneDrive is to restore the deleted user but this is not ideal case every time, so you must restore the deleted site/OneDrive and then assign administrative access to an active user using Set-SPOUser cmdlet. This command requires the URL of OneDrive, user login name and token of administrative access.
Set-SPOUser -Site "https://mstechtalk-my.sharepoint.com/personal/aamin_mstechtalk_com" -LoginName email@example.com -IsSiteCollectionAdmin $True
Important: You must have administrative access to run the command.
Latest posts by Adnan Amin (see all)
- SharePoint folder deletion error: Cannot delete/checked out issue - March 5, 2019
- Get list of all hidden lists in a SharePoint Site - February 27, 2019
- SharePoint Modern UI: Using Sites web part page - February 19, 2019