---
title: "Codeunit 6301 Power BI Service Mgt."
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/6301-power-bi-service-mgt/
type: codeunit
id: 6301
name: "Power BI Service Mgt."
app: "Base Application"
namespace: System.Integration.PowerBI
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/6301-power-bi-service-mgt/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 6301 Power BI Service Mgt.

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/6301-power-bi-service-mgt/

| | |
| --- | --- |
| App | Base Application |
| Namespace | System.Integration.PowerBI |
| Versions | 17-28 |
| Source file | Modules/System/PowerBI/PowerBIServiceMgt.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| GetReports | (var Record Power BI Report Buffer, var Text, var Text, Text[30]) | - | public | 17-21 | Pending 19.0 | Use GetReportsAndWorkspaces in codeunit "Power BI Workspace Mgt." instead. |
| GetReportsForUserContext | (var Record Power BI Report Buffer, var Text, var Text, Text[30]) | - | public | 17-21 | Pending 19.0 | Use the GetReportsForUserContext without the ExceptionMessage and ExceptionDetails parameters. |
| CheckForPowerBILicense | () | Boolean | public | 17-20 | Pending 18.0 | License check is no longer performed as a background task. Use CheckForPowerBILicenseInForeground instead. |
| IsReportEnabled | (Guid, Text) | Boolean | public | 17-25 | Pending 23.0 | A report is enabled for a context if there is a mathcing entry in table "Power BI Report Configuration". Substitute calls to IsReportEnabled(ReportId, Context) with PowerBIReportConfiguration.Get(UserSecurityId(), ReportId, Context). |
| IsUserReadyForPowerBI | () | Boolean | public | 17-28 | - | - |
| GetPowerBIResourceUrl | () | Text | public | 17-28 | - | - |
| GetPowerBiResourceName | () | Text | public | 17-28 | - | - |
| GetGenericError | () | Text | public | 17-28 | - | - |
| GetReportPageSize | () | Text | public | 17-22 | Pending 20.0 | Use GetFactboxRatio or GetMainPageRatio instead. |
| GetUnauthorizedErrorText | () | Text | public | 17-25 | Pending 23.0 | Error texts should be defined per extension. In other words, define your own text constants. |
| GetPowerBIUrl | () | Text | public | 17-21 | Pending 19.0 | Use the function GetLicenseUrl of codeunit 6324 "Power BI Url Mgt" instead. |
| GetContentPacksServicesUrl | () | Text | public | 17-28 | - | - |
| GetContentPacksMyOrganizationUrl | () | Text | public | 17-28 | - | - |
| UploadDefaultReportInBackground | () | - | public | 17-20 | Pending 18.0 | Use SynchronizeReportsInBackground instead |
| UploadDefaultReport | () | - | public | 17-20 | Pending 18.0 | Run codeunit "Power BI Report Synchronizer" instead |
| RetryUnfinishedReportsInBackground | () | - | public | 17-20 | Pending 18.0 | Use SynchronizeReportsInBackground instead |
| RetryAllPartialReportUploads | () | - | public | 17-20 | Pending 18.0 | Run codeunit "Power BI Report Synchronizer" instead |
| SelectDefaultReports | () | - | public | 17-20 | Pending 18.0 | Use PowerBIReportSynchronizer.SelectDefaultReports instead |
| DeleteDefaultReportsInBackground | () | - | public | 17-20 | Pending 18.0 | Use SynchronizeReportsInBackground instead |
| DeleteMarkedDefaultReports | () | - | public | 17-20 | Pending 18.0 | Run codeunit "Power BI Report Synchronizer" instead |
| UserNeedsToDeployReports | (Text[50]) | Boolean | public | 17-20 | Pending 18.0 | Use PowerBIReportSynchronizer.UserNeedsToSynchronize instead |
| UserNeedsToRetryUploads | () | Boolean | public | 17-20 | Pending 18.0 | Use PowerBIReportSynchronizer.UserNeedsToSynchronize instead |
| UserNeedsToDeleteReports | () | Boolean | public | 17-20 | Pending 18.0 | Use PowerBIReportSynchronizer.UserNeedsToSynchronize instead |
| IsUserDeployingReports | () | Boolean | public | 17-20 | Pending 18.0 | Use IsUserSynchronizingReports instead. |
| IsUserRetryingUploads | () | Boolean | public | 17-20 | Pending 18.0 | Use IsUserSynchronizingReports instead. |
| IsUserDeletingReports | () | Boolean | public | 17-20 | Pending 18.0 | Use IsUserSynchronizingReports instead. |
| SetIsDeployingReports | (Boolean) | - | public | 17-20 | Pending 18.0 | Use SetIsSynchronizing instead. |
| SetIsRetryingUploads | (Boolean) | - | public | 17-20 | Pending 18.0 | Use SetIsSynchronizing instead. |
| SetIsDeletingReports | (Boolean) | - | public | 17-20 | Pending 18.0 | Use SetIsSynchronizing instead. |
| IsPBIServiceAvailable | () | Boolean | public | 17-24 | Pending 22.0 | Power BI service status is no longer cached. |
| LogException | (var Text, var Text) | - | public | 17-18 | Pending 16.0 | Use more specific tags to make data classification and filtering easier. |
| LogMessage | (Text) | - | public | 17-18 | Pending 16.0 | Use more specific tags to make data classification and filtering easier. |
| CanHandleServiceCalls | () | Boolean | public | 17-23 | Pending 21.0 | Disabling the integration through AzureADMgtSetup has been discontinued. Remove permissions from single users instead. |
| HasUploads | () | Boolean | public | 17-25 | Pending 23.0 | Check "Power BI Report Uploads" table directly |
| GetFactboxFilterFromID | (Text) | Text | public | 17-21 | Pending 19.0 | Hardcoded name filtering for reports is deprecated. The user can search reports with the builtin search function in the page. |
| GetData | (var Text, var Text, Text) | Text | public | 17-25 | Pending 23.0 | Use interface "Power BI Service Provider" and its implementations instead. |
| GetDataCatchErrors | (var Text, var Text, var Integer, Text) | Text | public | 17-25 | Pending 23.0 | Use interface "Power BI Service Provider" and its implementations instead. |
| GetReportsUrl | () | Text | public | 17-28 | - | - |
| IsPowerBIDeploymentEnabled | () | Boolean | public | 17-23 | Pending 21.0 | Global switch for Power BI report deployment is no longer supported. |
| GetIsDeployingReports | () | Boolean | public | 17-20 | Pending 18.0 | User IsUserSynchronizingReports instead |
| UpdateEmbedUrlCache | (var Record Power BI Report Buffer, Text) | - | public | 17-21 | Pending 19.0 | This function was used to update old records just-in-time, and is no longer needed. |
| GetEnglishContext | () | Code[30] | public | 17-28 | - | - |
| IsUserAdminForPowerBI | (Guid) | Boolean | public | 17-28 | - | - |
| FormatSpecialChars | (Text) | Text | public | 17-25 | Pending 23.0 | Use platform capabilities to escape text in JSON strings instead. For example, text is escaped by platform when calling JsonArray.Add(Text). |
| CheckPowerBITablePermissions | () | Boolean | public | 17-28 | - | - |
| GetPowerBiTelemetryCategory | () | Text | public | 17-28 | - | - |
| CheckForPowerBILicenseInForeground | () | Boolean | public | 18-28 | - | - |
| SynchronizeReportsInBackground | () | - | public | 18-25 | Pending 23.0 | This function requires now a context parameter. |
| IsUserSynchronizingReports | () | Boolean | public | 18-28 | - | - |
| SetIsSynchronizing | (Boolean) | - | public | 18-25 | Pending 23.0 | Information on whether the user is synchronizing reports is no longer kept in a dedicated table. Instead, a user is synchronizing if they have a pending job queue entry for codeunit Power BI Report Synchronizer. If you want to stop synchronization for a user, create a new Job Queue Entry for codeunit Power BI Report Synchronizer and set it to On Hold. If you want to restart synchronization, make sure there is a ready job queue entry for codeunit Power BI Report Synchronizer. |
| GetJobQueueCategoryCode | () | Code[10] | public | 18-28 | - | - |
| GetReportsForUserContext | (var Record Power BI Report Buffer, Text[30]) | - | public | 19-23 | Pending 21.0 | Use physical table PowerBIReportConfiguration instead of temporary table TempPowerBIReportBuffer. |
| GetFactboxRatio | () | Text | public | 20-28 | Pending 27.0 | This function is now deprecated, and the client decides the addin ratio instead. |
| GetMainPageRatio | () | Text | public | 20-28 | Pending 27.0 | This function is now deprecated, and the client decides the addin ratio instead. |
| SynchronizeReportsInBackground | (Text[50]) | - | public | 23-28 | - | - |
| AddReportVisualForContext | (Guid, Text[200], Text[200], Text[50]) | - | public | 23-28 | - | - |
| AddReportForContext | (Guid, Text[50]) | - | public | 23-28 | - | - |
| GetPowerBiFeatureTelemetryName | () | Text | internal | 23-28 | - | - |
| GetEmbedAccessToken | () | Text | internal | 23 | - | - |
| CreateServiceProvider | (var Interface Power BI Service Provider) | - | internal | 23-28 | - | - |
| InitializeAddinToken | (ControlAddIn PowerBIManagement) | - | public | 24-28 | - | - |
| LogVisualLoaded | (Text, Enum Power BI Element Type) | - | public | 26-28 | - | - |
| LogEmbedError | (Text) | - | public | 26-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnGetReports | (var Record Power BI Report Buffer, var Text, var Text, Text[30]) | 17-23 | Pending 21.0 | Events to override the Power BI integration behavior are no longer supported. |
| Integration event | OnUploadReports | (var DotNet ImportReportRequestList, var DotNet ImportReportResponseList) | 17-23 | Pending 21.0 | Events to override the Power BI integration behavior are no longer supported. |
| Integration event | OnRetryUploads | (var DotNet ImportedReportRequestList, var DotNet ImportedReportResponseList) | 17-23 | Pending 21.0 | Events to override the Power BI integration behavior are no longer supported. |
| Internal event | OnServiceProviderCreate | (var Interface Power BI Service Provider, var Boolean) | 23-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
