Forum Discussion
Reading file from onedrive
- 1 year ago
Hi msprog,
Thanks for reaching out to the Microsoft fabric community forum.
To address your issue -
Move the File to SharePoint or a Team’s OneDrive :SharePoint document libraries (which back Microsoft Teams and shared OneDrive locations) are not tied to an individual user account, so they remain available even if a team member leaves.
Steps:
Move the Excel/CSV file to a SharePoint Online document library (e.g., a Team site or a shared department folder).
In Power BI Desktop -Use “Get Data” - Web or SharePoint Folder option. Use the link to the file in SharePoint (make sure it is a direct or accessible path). Publish the report to Power BI Service. Set up scheduled refresh using OAuth2 with a service account or admin-managed account .
(Alternative Solution)
Use a Shared Service Account for OneDrive :
Keeps using OneDrive approach. Isolated from any individual user's employment status.Try To implement:
Create a generic OneDrive account, e.g - [email protected] (make sure it's a licensed Microsoft 365 user). Upload the data file to that account’s OneDrive. Share the file with yourself (and others, if needed). Update your Power BI report to use this new file path. When setting up refresh in the Power BI Service -
-
Sign in using that generic account for authentication to OneDrive
-
Use OAuth2 authentication, so that Power BI uses the token of the service account.
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it
Best Regards,
Sreeteja.
Community Support Team -
Hi msprog ,
One solution is to store the document in a shared SharePoint team folder and grant access through an Active Directory (AD) security group. This approach simplifies access management and ensures that the file remains accessible even if someone leaves the organization.
Additionally, you can grant access to a service account, then authenticate Power BI to the SharePoint folder using that service account. This ensures long-term stability, avoiding issues if a user leaves.
If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.
Thanks,
Samson
Connect with me on LinkedIn
Check out my Blog
Going to the European Microsoft Fabric Community Conference? Check out my Session
Thanks for this. Once i publish the pbi report to the service, i need to configure the dataset to read the sharepoint file. how do i grant access to the service account to the sharepoint folder?