Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I am working on PowerBI. I have a report that reads a file from my onedrive account. Now the concern raised is what will happen if i leave the organisation- my one drive account will be disabled. So how can we address this concern?
Is it possible to create a generic non-user account which has onedrive access? or any other better way please
@Poojara_D12 @v-sshirivolu 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
Hi @msprog
Ensure the service account has the necessary Microsoft 365 license (e.g., Power BI Pro if needed).
Share the SharePoint file (or folder) with the service account (e.g., powerbi.shared@yourcompany.com
Open the SharePoint document library.
Click on the file or folder → "Share" → Invite the service account with View/Read access.
Log into Power BI Service using the service account (once):
This is just to establish credentials.
After login, go to the dataset settings → Data source credentials → Edit credentials.
Choose OAuth2 → Sign in, and use the service account to authenticate.
Once authorized, Power BI will use that token (service account) for refreshes — even if the report was published by another user.
Hello thanks for your support. But i tried the approach you are suggesting. when i login using the shared service account, it says that the semantic model is owned by the original user. isn't this an issue? if the original owner republishes the report or the model , will this still work?
Hi @msprog ,
If the semantic model (dataset) is originally published by a different user (not the service account), Power BI will consider that user as the owner of the dataset. This can lead to issues such as:
Access and refresh failures if the original owner leaves the organization or loses access.
OneDrive refresh not working as expected, since it relies on the identity and permissions of the publishing user.
Re-publishing by the original owner might rebind the dataset/report to their credentials, undoing the benefits of the shared service setup.
To avoid these issues, follow this approach:
Re-publish the PBIX file using the service account:
Sign in to Power BI Desktop with the service account.
Open the PBIX file.
Save it to the service account's OneDrive location (or shared library if using SharePoint).
Publish to the workspace.
Rebind all related artifacts (reports, dashboards) to the newly published dataset.
Ensure the service account has the correct permissions on the OneDrive file or SharePoint location where the PBIX is stored.
This ensures that:
The dataset ownership lies with the service account.
Any refresh schedules, including OneDrive automatic refresh, work seamlessly.
There is no dependency on the original user, preventing disruption if they leave or make changes.
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,
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.
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.
Create a generic OneDrive account, e.g - powerbi.shared@yourcompany.com (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
You're absolutely right to be concerned—if your Power BI report reads data from your personal OneDrive (associated with your user account), that connection will break once your account is disabled (e.g., if you leave the organization), because OneDrive access is tied to your individual identity. The best practice in this scenario is to avoid using personal or individual OneDrive accounts for shared or organizational reports. Instead, the recommended solution is to store the file in a SharePoint Online Document Library (which is part of Microsoft 365 and can be backed by Teams or a shared SharePoint site). Power BI supports connecting directly to SharePoint folders, and files placed there are not tied to an individual user’s lifecycle. Alternatively, if your organization prefers OneDrive, you can request your IT department to create a shared or generic service account with a OneDrive or SharePoint license. This account should be managed like a service identity, with access delegated appropriately. The file would then reside in that account’s storage, and the Power BI dataset would connect to it using that service account's credentials. Make sure to set up a Power BI gateway or OAuth credentials accordingly in the Power BI Service. This ensures continuity of access and minimizes risk due to personnel changes, making your report architecture more sustainable and enterprise-compliant.
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?
User | Count |
---|---|
47 | |
32 | |
30 | |
27 | |
25 |
User | Count |
---|---|
55 | |
55 | |
35 | |
33 | |
28 |