Forum Discussion
Reading file from onedrive
- Anonymous1 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 -
Poojara_D12 Anonymous i place the file in a sharepoint document library. I publish the report to the service. Now i login into the PBI service using my account. i need to configure the dataset to read the file. I don't see any option to configure a service account. Under oauth2, it just says signin - it uses the singed in account which is my personal account .
Secondly, if i use a service account, how do i ensure the service account has access to the file? please clarify