A comprehensive Business Central extension that enables seamless monitoring and management of Microsoft Power BI resources, allowing you to synchronize, track, and monitor Power BI workspaces, datasets, and dataflows directly from Business Central.
- Overview
- Features
- Prerequisites
- Installation
- Configuration
- Usage
- Architecture
- Security
- Troubleshooting
- API Reference
- Contributing
- License
- Service-Oriented Design: Complete migration from monolithic to specialized service architecture
- Enhanced Error Handling: Improved error detection with actionable user feedback
- Zero Breaking Changes: Seamless upgrade maintaining all existing functionality
- Better Maintainability: Clean separation of concerns and modular design
- Status Filtering: Quick filters to show only failed refreshes for troubleshooting
- Refresh Summary: Detailed summary views for individual refresh operations
- Cross-Navigation: Easy navigation between related pages and data
- Error Analysis: Comprehensive error detail viewing for failed operations
- Comprehensive Error Monitoring: Dedicated error overview dashboard with 30-day statistics and drill-down capabilities
- Streamlined Sync Messages: Reduced sync message noise from 5 messages to 1 essential message
- Fixed GUID comparison issues in dataflow synchronization
- Resolved refresh history data population problems
- Improved error handling for missing or invalid workspace IDs
- Enhanced validation for bulk operations
The Power BI Monitor extension bridges Business Central and Power BI, providing:
- Centralized Monitoring: Monitor all Power BI resources from within Business Central
- Automated Synchronization: Keep BC data in sync with Power BI content
- Performance Analytics: Track refresh performance and status
- User-Friendly Setup: Guided wizard for easy configuration
- Enterprise Security: OAuth 2.0 authentication with Azure AD
- Synchronize Power BI workspaces
- View workspace details and access rights
- Navigate directly to Power BI portal
- List and manage datasets across workspaces
- Individual & Bulk Refresh Operations: Refresh single, selected, or all datasets
- Monitor refresh status and performance in real-time
- Comprehensive Refresh History: Detailed tracking of all refresh operations
- Performance metrics with duration statistics and success rates
- Smart Filtering: Only refreshable datasets are processed in bulk operations
- View and manage Power BI dataflows across workspaces
- Enhanced Refresh Operations: Individual, bulk selected, and bulk all refresh capabilities
- Transaction Monitoring: Detailed tracking of dataflow refresh transactions
- Refresh History Management: Store and analyze complete refresh history
- Performance tracking with duration and error analysis
- Workspace-specific synchronization options
- Detailed Refresh History Pages: Comprehensive views with advanced filtering
- Performance Metrics Dashboard: Success/failure rates, duration trends, and statistics
- Error Analysis: Detailed error information for troubleshooting failed operations
- Status Filtering: Quick access to failed operations for immediate attention
- Cross-resource analytics and reporting capabilities
- Comprehensive Error Dashboard: Unified view of all Power BI refresh errors with summary statistics
- 30-Day Error Statistics: Dataset and dataflow error counts over the last 30 days
- Recent Error Summary: Quick overview of recent errors from the last 7 days
- Error Drill-Down: Navigate from summary statistics to detailed error records
- Most Recent Error Tracking: Display when the last error occurred across all resources
- Integrated Navigation: Access error monitoring from multiple entry points in the application
- Real-Time Error Data: Refresh error statistics on-demand with comprehensive data updates
- Organized Action Groups: Logically grouped actions (Refresh, History, Filters)
- Consistent Interface: Standardized naming and behavior across all pages
- Comprehensive Feedback: Detailed operation results with success/failure counts
- Smart Confirmations: Context-aware confirmation dialogs with relevant information
- Cross-Page Navigation: Easy navigation between related resources and their history
- Setup Wizard: Step-by-step guided configuration
- Advanced Setup: Direct configuration for power users
- Auto-Sync: Scheduled automatic synchronization
- Role Center: Dedicated Power BI management interface
- Business Central: Version 26.0 or later
- Power BI Pro License: Required for API access
- Azure AD: Admin access for app registration
- Permissions: Ability to register applications in Azure AD
- Power BI workspace(s) with content
- Service Principal access to workspaces (recommended)
- Admin consent for API permissions
1. Download the .app file
2. Install via Business Central Extension Management
3. Refresh your browser/client
Choose one of two setup methods:
- Go to Assisted Setup in Business Central
- Find "Power BI Monitor Setup"
- Follow the step-by-step wizard
- Navigate to Power BI Setup page
- Configure authentication manually
- Test the connection
1. Go to Azure Portal (portal.azure.com)
2. Navigate to Azure Active Directory > App registrations
3. Click "New registration"
4. Name: "Business Central Power BI Monitor"
5. Account type: "Accounts in this organizational directory only"
6. Click "Register"
Add the following Application permissions for Power BI Service:
Dataset.Read.All- Read dataset metadataDataset.ReadWrite.All- Trigger dataset refreshesDataflow.Read.All- Read dataflow metadataDataflow.ReadWrite.All- Trigger dataflow refreshesGroup.Read.All- Access workspace informationWorkspace.Read.All- Read workspace metadata
Important: Grant admin consent for all permissions.
1. Go to "Certificates & secrets"
2. Click "New client secret"
3. Set appropriate expiration
4. Copy the secret value immediately
Enter the following in Power BI Setup:
- Client ID: Application (client) ID
- Client Secret: Secret value from step 3
- Tenant ID: Directory (tenant) ID
- Authority URL:
https://login.microsoftonline.com/ - Power BI API URL:
https://api.powerbi.com/v1.0/myorg/
-
Initial Synchronization
Power BI Workspaces → Actions → Refresh All Workspaces -
View Datasets
Power BI Datasets → Review synchronized datasets -
Trigger Refreshes
Power BI Datasets → Actions → Refresh Selected Dataset
- View All Workspaces: Navigate to "Power BI Workspaces"
- Refresh Workspace Data: Use "Refresh All Workspaces" action
- Access Workspace: Click "Open in Power BI" to navigate to portal
- Individual Refresh: "Refresh This Dataset" for single dataset operations
- Bulk Refresh: "Refresh Selected Datasets" or "Refresh All Datasets in View"
- Monitor Status: Real-time status tracking with "Last Refresh Status" column
- View Performance: Review "Average Refresh Duration" and success rate metrics
- Manage History: "Update Refresh History" actions (individual, selected, or all)
- Analyze History: Navigate to detailed refresh history with filtering options
- View Dataflows: Navigate to "Power BI Dataflows" with workspace information
- Synchronization: "Sync All Dataflows" or "Sync Dataflows for This Workspace"
- Refresh Operations: Individual, selected, or bulk refresh capabilities
- History Management: Comprehensive refresh history tracking and analysis
- Monitor Transactions: Detailed transaction tracking with error analysis
- Advanced Filtering: Filter by resource, workspace, status, or show failed operations only
- Error Details: View comprehensive error information for failed operations
- Refresh Summary: Detailed summary views for individual refresh operations
- Cross-Navigation: Easy navigation between history and source resources
- Access Methods: Available via Tell Me search, Power BI Role Center, or integrated navigation
- Error Overview: View 30-day error statistics for both datasets and dataflows
- Recent Errors: Quick summary of errors from the last 7 days with drill-down capabilities
- Error Drill-Down: Click on error counts to view filtered lists of specific error types
- Data Refresh: Update error statistics on-demand using the refresh action
- Cross-Navigation: Navigate to dataset/dataflow management pages from error context
1. Power BI Setup → Actions → Manage Auto Sync
2. Enable automatic synchronization
3. Configure schedule (default: every 30 minutes)
4. Monitor job queue entry status
Configure dataset refreshes to run automatically:
1. Power BI Datasets → Select dataset
2. Actions → Schedule Refresh (requires custom implementation)
- Power BI Setup (90110): Configuration and authentication
- Power BI Workspace (90111): Workspace information
- Power BI Dataset (90112): Dataset metadata and metrics
- Power BI Dataflow (90113): Dataflow information
- Power BI Report (90114): Report metadata
- PBI Dataset Refresh History (90120): Detailed dataset refresh tracking
- PBI Dataflow Refresh History (90121): Detailed dataflow refresh tracking
- Power BI Refresh Errors (90145): Comprehensive error dashboard with 30-day statistics
- Power BI Recent Errors List (90146): CardPart component for recent error summaries
Core Orchestration Layer:
- Power BI API Orchestrator (90120): Clean orchestration layer with improved error handling
- Power BI Auto Sync (90121): Automation functionality
Infrastructure Services:
- Power BI Authentication (90130): OAuth token management
- Power BI Http Client (90131): Centralized HTTP communication and authentication
- Power BI Json Processor (90132): Reusable JSON parsing utilities
Specialized Resource Managers:
- Power BI Workspace Manager (90134): Workspace operations and management
- Power BI Dataset Manager (90133): Dataset operations and refresh management
- Power BI Dataflow Manager (90135): Dataflow operations and transaction tracking
- Power BI Dashboard Manager (90136): Dashboard operations and management
- Power BI Report Manager (90137): Report operations and management
- Resource Management Pages: Enhanced interfaces for workspaces, datasets, dataflows, and reports
- Refresh History Pages: Dedicated pages for detailed refresh history analysis
- Error Monitoring Dashboard: Comprehensive error overview with statistics and drill-down capabilities
- Error Summary Components: Reusable CardPart for integrated error monitoring
- Role Center: Dedicated Power BI management workspace with quick access to all features
- Setup Wizard: Guided configuration experience for easy setup
- Overview Pages: Dashboard-style summaries with performance metrics
- Standardized Actions: Consistent action grouping and naming across all pages
Service-Oriented Design:
- Single Responsibility: Each manager handles one specific Power BI resource type
- Separation of Concerns: HTTP, JSON, and business logic cleanly separated
- Better Error Handling: Enhanced error detection with actionable user feedback
- Improved Maintainability: Smaller, focused components that are easier to test and extend
Enhanced User Experience:
- Consistent Error Messages: Standardized error handling across all operations
- Better Success Feedback: Clear confirmation messages with operation details
- Actionable Guidance: Error messages include troubleshooting suggestions
Business Central → PowerBI API Orchestrator → Specialized Managers
↓ ↓ ↓
PowerBI HTTP Client → Authentication → JSON Processor
↓ ↓ ↓
Azure AD Token → Power BI REST API → Response Processing
↓ ↓ ↓
Token Caching → HTTP Response → Database Storage
Previous Architecture (v1.1.0 and earlier):
- Single 3000+ line codeunit mixing all concerns
- Generic error handling
- Difficult to maintain and extend
New Architecture (v1.2.0+):
- Clean service-oriented design with specialized managers
- Enhanced error handling and user feedback
- Modular, extensible, and maintainable
- Zero breaking changes during migration
- OAuth 2.0: Client credentials flow
- Token Caching: 50-minute cache duration
- Secret Storage: Encrypted in BC database
- API Permissions: Principle of least privilege
- Uses OAuth 2.0 client credentials flow
- Tokens cached for 50 minutes to minimize API calls
- Automatic token refresh when expired
- Client secrets encrypted in Business Central
- API communications over HTTPS only
- No Power BI data stored permanently in BC
- Respects Business Central user permissions
- Power BI workspace access controlled by Power BI
- Service principal recommended for production
- Rotate client secrets regularly
- Monitor token usage and API limits
- Use dedicated service accounts
- Implement proper backup procedures
Symptoms: "Authentication failed" messages Solutions:
- Verify client ID, secret, and tenant ID
- Check admin consent was granted
- Ensure client secret hasn't expired
- Validate Azure AD app permissions
Symptoms: "Forbidden" or "Unauthorized" errors Solutions:
- Grant admin consent for all required permissions
- Verify service principal has workspace access
- Check Power BI admin settings don't block service principals
Symptoms: Missing workspaces or datasets Solutions:
- Verify workspace membership/access
- Check Power BI admin policies
- Review service principal workspace permissions
- Test with user account first
Symptoms: "HTTP Send failed" errors Solutions:
- Check internet connectivity
- Verify firewall allows HTTPS to Azure/Power BI
- Test from Business Central server directly
- Review proxy settings if applicable
-
Test Authentication
Power BI Setup → Actions → Test Connection -
Check Configuration
Power BI Setup → Verify all fields completed -
Review Azure AD App
Azure Portal → App registrations → Your app Check permissions and secrets -
Validate Power BI Access
Test with same credentials in Power BI portal Verify workspace access
| Code | Description | Solution |
|---|---|---|
| 400 | Bad Request | Check request parameters |
| 401 | Unauthorized | Verify authentication |
| 403 | Forbidden | Check permissions |
| 404 | Not Found | Verify resource exists |
| 429 | Rate Limited | Reduce API call frequency |
| 500 | Server Error | Retry later or contact support |
Issue: "Invalid format of GUID string" when syncing dataflows for workspace
Solution: Fixed GUID comparison logic in workspace synchronization actions
Details: Changed from string comparison (<> '') to proper GUID comparison (<> EmptyGuid)
// Core Synchronization Operations
procedure SynchronizeAllData(): Boolean
procedure SynchronizeWorkspaces(): Boolean
procedure SynchronizeDatasets(WorkspaceId: Guid): Boolean
procedure SynchronizeDataflows(WorkspaceId: Guid): Boolean
procedure SynchronizeDashboards(WorkspaceId: Guid): Boolean
procedure SynchronizeReports(WorkspaceId: Guid): Boolean
// Refresh Operations
procedure TriggerDatasetRefresh(WorkspaceId: Guid; DatasetId: Guid): Boolean
procedure TriggerDataflowRefresh(WorkspaceId: Guid; DataflowId: Guid): Boolean
// History Operations
procedure GetDatasetRefreshHistory(WorkspaceId: Guid; DatasetId: Guid): Boolean
procedure GetDataflowRefreshHistory(WorkspaceId: Guid; DataflowId: Guid): Boolean
// Backward Compatibility Methods
procedure SynchronizeReports(): Boolean
procedure SynchronizeReportsForWorkspace(WorkspaceId: Guid): Booleanprocedure GetAuthToken(): Text
procedure RefreshToken(): Boolean
procedure ValidateConfiguration(): Booleanprocedure SynchronizeDatasets(WorkspaceId: Guid): Boolean
procedure TriggerDatasetRefresh(WorkspaceId: Guid; DatasetId: Guid): Boolean
procedure GetRefreshableDatasets(WorkspaceId: Guid; var RefreshableDatasets: Record "Power BI Dataset"): IntegerOnAfterPowerBISetup()
OnBeforeAuthentication()
OnAfterSuccessfulConnection()OnBeforeWorkspaceSync()
OnAfterWorkspaceSync()
OnBeforeDatasetSync()
OnAfterDatasetSync()- Clone the repository
- Install AL Language extension
- Configure launch.json for your BC environment
- Download symbols and compile
- Follow AL coding guidelines
- Include comprehensive documentation
- Write unit tests for new functionality
- Use meaningful variable and procedure names
- Create feature branch
- Implement changes with tests
- Update documentation
- Submit pull request with description
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Check this README and inline help
- Issues: Report bugs via GitHub issues
- Questions: Use GitHub discussions
- Install the extension
- Register Azure AD application
- Configure API permissions
- Create client secret
- Run setup wizard
- Test connection
- Synchronize workspaces
- Verify dataset access
- Test refresh operations
- Enable auto-sync (optional)
After setup, explore these features:
- Dashboard Views: Check the overview pages for insights
- Performance Monitoring: Review refresh metrics
- Automation: Set up scheduled synchronization
- Custom Reports: Build reports using the synchronized data
- Advanced Configuration: Explore additional settings
- 🚨 Comprehensive Error Monitoring: New error dashboard with 30-day statistics and drill-down capabilities
- 📊 Error Analytics: Detailed error tracking for both datasets and dataflows with recent error summaries
- 🎯 Streamlined User Experience: Reduced sync message noise from 5 to 1 essential message
- 🔍 Multiple Access Points: Error monitoring accessible via Tell Me, Role Center, and integrated navigation
- 📈 Real-Time Error Updates: On-demand refresh of error statistics and comprehensive data updates
- ✨ Enhanced Navigation: Integrated error monitoring across all main Power BI management pages
- 🎨 CardPart Integration: Reusable error summary component for integration into other pages
- 🏗️ Service-Oriented Architecture: Complete migration from monolithic to service-oriented design
- 🔧 Enhanced Error Handling: Improved error detection with actionable user feedback
- 📦 Specialized Managers: Dedicated managers for each Power BI resource type
- 🎯 Clean Orchestration: New PowerBI API Orchestrator provides unified, clean interface
- 🔄 Zero Breaking Changes: Seamless migration maintaining all existing functionality
- 📈 Better Maintainability: Smaller, focused components easier to test and extend
- ✨ Improved UX: Enhanced success/error messaging with troubleshooting guidance
- 🏛️ Modular Design: Easy to add new Power BI resource types and operations
- ✅ Enhanced Refresh History: Complete refresh history tracking for datasets and dataflows
- ✅ Improved User Interface: Standardized actions with consistent grouping and naming
- ✅ Bulk Operations: Comprehensive bulk refresh capabilities (selected/all)
- ✅ Advanced Filtering: Enhanced filtering options in history pages
- ✅ Error Analysis: Detailed error information and troubleshooting capabilities
- ✅ Bug Fixes: Resolved GUID format errors and data population issues
- ✅ Performance: Optimized API calls and response processing
- ✅ Core Functionality: Basic Power BI resource synchronization
- ✅ Authentication: OAuth 2.0 client credentials flow
- ✅ Setup Wizard: Guided configuration experience
- ✅ Basic Operations: Individual refresh operations and monitoring
Power BI Monitor v1.2.0 | Built with ❤️ for Business Central | Service-Oriented Architecture ✨