If a user's OneDrive isn't provisioned but the user has a license to use OneDrive, this request will automatically provision the user's drive, when using delegated authentication
It does however not, and the reason why is unclear.
I got a user with an Microsoft E3 license assigned and im using the permissions described in the documentation.
Same here. I really need this feature.
Because I am using Apple M3 Macbook, Which the PowerShell module "Microsoft.Online.SharePoint.PowerShell" does not support this arch...
Describe the bug
I want to pre-provision users OneDrive using the following method: https://learn.microsoft.com/en-us/graph/api/drive-get?view=graph-rest-1.0&tabs=powershell
According to the documentation this should work:
It does however not, and the reason why is unclear.
I got a user with an Microsoft E3 license assigned and im using the permissions described in the documentation.
Expected behavior
OneDrive site get created
How to reproduce
$Scopes = @( 'Files.Read' 'Sites.ReadWrite.All' 'Sites.Read.All' 'Files.Read.All' 'Files.ReadWrite.All' )
Import-Module Microsoft.Graph.Files -RequiredVersion 2.23.0 Connect-Graph -Scopes $Scopes
Get-MgUserDefaultDrive -UserId "user1@"
SDK Version
2.23.0
Latest version known to work for scenario above?
No response
Known Workarounds
Using PnP.PowerShell
Request-SPOPersonalSite -UserEmails <upn>
Debug output
Click to expand log
``` DEBUG: [CmdletBeginProcessing]: - Get-MgUserDefaultDrive begin processing with parameterSet 'Get'. DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'. DEBUG: [Authentication]: - Scopes: [Agreement.ReadWrite.All, Application.Read.All, CloudPC.ReadWrite.All, DeviceManagementApps.ReadWrite.All, DeviceManagementConfiguration.ReadWrite.All, DeviceManagementManagedDevices.ReadWrite.All, DeviceManagementRBAC.ReadWrite.All, DeviceManagementServiceConfig.ReadWrite.All, Directory.ReadWrite.All, email, Files.Read, Files.Read.All, Files.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, openid, Organization.ReadWrite.All, Policy.Read.All, Policy.ReadWrite.ConditionalAccess, PrivilegedAccess.ReadWrite.AzureADGroup, profile, RoleManagement.ReadWrite.Directory, RoleManagementPolicy.ReadWrite.AzureADGroup, Sites.Read.All, Sites.ReadWrite.All, User.Read, User.Read.All, User.ReadWrite.All]. DEBUG: ============================ HTTP REQUEST ============================ HTTP Method: GET Absolute Uri: https://graph.microsoft.com/v1.0/users/Configuration
PSVersion 7.4.5 PSEdition Core GitCommitId 7.4.5 OS Microsoft Windows 10.0.22631 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
Other information
No response