Forum Discussion
Quick Fix for OAuth2 or “Organizational Account” Authentication Support in Power BI Report Server
- 1 year ago
Hi mvyas,
Thank you for reaching out to Microsoft Fabric Community Forum.
Power BI Report Server (PBIRS) does not support OAuth2 (including "Organizational Account") authentication for scheduled data refreshes. Below are the few workaround you can try:
1)Use Scheduled Data Export with Power Automate or PowerShell:
- Set up a Power Automate flow to export SharePoint Online List/Excel content to a OneDrive or File Share.
- Use a script or task scheduler to download the data from OneDrive to your on-prem folder.
- In Power BI Desktop (for PBIRS), use the Folder or CSV data source.
- Publish to PBIRS and schedule the refresh using a Windows credential.
2)Store Files Locally via OneDrive Sync:
- Use OneDrive sync client to sync a SharePoint document library locally.
- Point Power BI to the synced folder (e.g., C:\Users\YourName\SharePoint Docs.)
- Schedule refresh in PBIRS as it's now reading a local file (Windows auth works).
PowerShell Script to Export SharePoint List to CSV:
Install-Module -Name "PnP.PowerShell" -Force -Scope CurrentUser
# Define variables
$siteUrl = "https://yourtenant.sharepoint.com/sites/yoursite"
$listName = "YourListName"
$outputCsvPath = "C:\PBIRSData\SharePointData.csv"# Connect to SharePoint Online
Connect-PnPOnline -Url $siteUrl -Interactive# Get list items (you can use -PageSize and -Fields if needed)
$listItems = Get-PnPListItem -List $listName -PageSize 500# Convert to CSV format
$data = $listItems | ForEach-Object {
$item = $_.FieldValues
[PSCustomObject]@{
ID = $item["ID"]
Title = $item["Title"]
Created = $item["Created"]
Modified = $item["Modified"]
Status = $item["Status"] # Example custom field
AssignedTo = $item["AssignedTo"] # Example custom field
}
}# Export to CSV
$data | Export-Csv -Path $outputCsvPath -NoTypeInformation -Encoding UTF8Write-Host "Data exported successfully to $outputCsvPath"
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Chaithanya.
v-kathullac : Thanks for the information. I agree to all this. The only concern is that data gateway works good with Power BI service and not with on prem report server. Am I correct?
Hi mvyas,
the answer for your question is YES here are the few detailed points.
1) Power BI Report Server does not use the Data Gateway.
2) It connects directly to on-premises data sources.
3) All data sources must be accessible from the report server machine.
4) Scheduled refresh is configured in Report Server Configuration Manager, not via Power BI Service.
Regards,
Chaithanya.
- mvyas1 year agoNew Member
Thanks v-kathullac
I am looking for an approach which would be a quick fix. We are not planning to move to cloud immediately and more of a gradual process as you might know.
For the approach you suggested where we "Store Files Locally via OneDrive Sync", won't it cause data redundancy and heavy on cost? Please let me know if I understood this correctly. Please share more details if I am taking a wrong approach. Below is the diagram to explain:
Let me know your thoughts and Thank you in advance! v-kathullac- v-kathullac1 year agoCommunity Support
Hi mvyas ,
Thank you for reaching out to Microsoft Fabric Community Forum.
I think you are already considering a solid strategy to manage the potential cost and complexity issues associated with syncing files between OneDrive and local storage I agree that the key challenges here revolve around data redundancy, increased infrastructure costs, and the added complexity of managing multiple copies of data.below are few points which might generally occurs.
-
Syncing files with OneDrive locally and using Power BI can lead to data redundancy, increasing storage costs by keeping duplicate copies in both the cloud and local systems.
-
Managing large datasets (TBs) across multiple locations increases infrastructure costs, including storage and network bandwidth.
-
Use a hybrid approach by syncing only essential files to OneDrive and keeping others locally, gradually transitioning to cloud-based solutions as infrastructure grows.
-
Consider cloud backup services like AWS S3 or Azure Blob Storage for large datasets, instead of syncing all files via OneDrive.
-
Plan a gradual cloud transition, assessing which parts of your infrastructure can be shifted without significant redundancy and focusing on areas where the cost is manageable.
- Use Power BI Dataflows or Azure Data Lake to connect to cloud data sources directly instead of relying on synced files
- Automate file movement using tools like Power Automate, Azure Logic Apps, or custom scripts to push only needed files to OneDrive
Regards,
Chaithanya.
-