Forum Discussion
Registered App > Grant Permission to OneDrive?
Hey, the error you’re seeing usually happens when the account doesn’t have OneDrive fully set up or lacks a valid license. It’s not just a permissions issue.
Here’s what you can do:
1 - Force OneDrive provisioning:
Make sure the account has a valid OneDrive for Business license. To force the creation of the personal site (OneDrive), you can use PowerShell:
- Install the SharePoint Online module: Install-Module -Name Microsoft.Online.SharePoint.PowerShell
- Connect to your SharePoint tenant: Connect-SPOService -Url https://<tenant>-admin.sharepoint.com
Replace <tenant> with your tenant name.
- Request personal site provisioning: Request-SPOPersonalSite -UserEmails "<user>@domain.com"
This command forces the creation of the user’s personal site (OneDrive).
Alternatively, ask users to log in to https://onedrive.office.com, which will trigger the automatic creation of their OneDrive.
2. Check permissions:
Ensure the app has Files.ReadWrite.All and Sites.ReadWrite.All permissions. If you’re working in a user context, use delegated permissions, not just "app-only" ones.
3. Admin consent:
Verify that all required permissions have received admin approval.
Hi, really appreciate your response !!
I have the permissions configured like this and clicked on 'admin approval':
Still doesn't work. Or am I missing something here?
So the issue is probably with the OneDrive setup, right?
For me it says the URL https://onedrive.office.com is not valid.
I've checked in the 365 Admin Panel and it seems like I indeed only have a 'Power Automate Free' license.
We have a Office 365 E3 license left. Do I really need this? Would need to ask my client if this is okay for them.
Does the thing with PowerShell work even without the license? Never used PowerShell before.
Thanks a lot !