Microsoft OneDrive for Business or Microsoft SharePoint backups may not be backed up, resulting in a warning: User does not have a valid Microsoft Office 365 license with SharePoint plan enabled.
To resolve this issue, add missing Plans IDs to the list according to the following steps:
Get the current Office 365 plan IDs assigned for the organization. You can do this via ‘MSOnline’ AzureAD module and the following PowerShell One-Liners: *
Note: This script is provided as-is as a courtesy for Gathering Plan IDs from MSOnline. Please be aware that the commands and parameters may be altered by Microsoft in the future, which may cause the script to function incorrectly. There is no support provided for this script, and should it fail, we ask you to contact Microsoft support. This script may be updated in the future to reflect changes to the Office 365 Powershell Environment
To call "get-msolaccountsku" (use the CMDLET), call "Connect-MsolService" first. This requires the following modules to be installed and activated:
If an error about installing the NuGet provider occurs when running the above Install-Module comandlets, run the following command to force PowerShell to connect using TLS 1.2