---
id: object/codeunit/6301
type: object
title: Codeunit 6301 "Power BI Service Mgt."
summary: Codeunit 6301 "Power BI Service Mgt." in Base Application (System.Integration.PowerBI). 24 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC24-26, BC28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 5d24e497a3f9abaf9692e5651a95be1ae59f82c86a51f1f5968b2d997a1db149
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Modules/System/PowerBI/PowerBIServiceMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Modules/System/PowerBI/PowerBIServiceMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 6301
name: Power BI Service Mgt.
namespace: System.Integration.PowerBI
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "26"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 25
  events: 1
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 6
  called_by: 18
  implements: 0
---

# Codeunit 6301 "Power BI Service Mgt."

> Codeunit 6301 "Power BI Service Mgt." in Base Application (System.Integration.PowerBI). 24 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC24-26, BC28.

Base Application · System.Integration.PowerBI · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Modules/System/PowerBI/PowerBIServiceMgt.Codeunit.al) · facts from BC29

## Events published

- `OnServiceProviderCreate(var PowerBIServiceProvider: Interface "Power BI Service Provider"; var Handled: Boolean)` (internal)

## Procedures

- `CheckForPowerBILicenseInForeground(): Boolean`
- `IsUserReadyForPowerBI(): Boolean`
- `GetPowerBIResourceUrl(): Text`
- `GetPowerBiResourceName(): Text`
- `GetGenericError(): Text`
- `GetFactboxRatio(): Text` (obsolete 27.0: This function is now deprecated, and the client decides the addin ratio instead.)
- `GetMainPageRatio(): Text` (obsolete 27.0: This function is now deprecated, and the client decides the addin ratio instead.)
- `GetContentPacksServicesUrl(): Text`
- `GetContentPacksMyOrganizationUrl(): Text`
- `SynchronizeReportsInBackground(Context: Text[50])`
- `IsUserSynchronizingReports(): Boolean`
- `GetReportsUrl(): Text`
- `GetEnglishContext(): Code[30]`
- `AddReportVisualForContext(ReportId: Guid; ReportPageId: Text[200]; ReportVisualId: Text[200]; Context: Text[50])`: Add a Power BI report visual to the database, so that it's displayed in a certain context for the current user.
- `AddReportForContext(ReportId: Guid; Context: Text[50])`: Add a Power BI report to the database, so that it's displayed in a certain context for the current user.
- `IsUserAdminForPowerBI(UserSecurityId: Guid): Boolean`
- `CheckPowerBITablePermissions(): Boolean`
- `GetPowerBiTelemetryCategory(): Text`
- `GetJobQueueCategoryCode(): Code[10]`
- `GetPowerBiFeatureTelemetryName(): Text` (internal)
- `InitializeAddinToken(PowerBIManagement: ControlAddIn PowerBIManagement)`
- `LogVisualLoaded(CorrelationId: Text; EmbedType: Enum "Power BI Element Type")`
- `LogEmbedError(ErrorCategory: Text)`
- `CreateServiceProvider(var PowerBIServiceProvider: Interface "Power BI Service Provider")` (internal)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 6300 "Azure AD Mgt."](../codeunit/6300.md) (4 calls: `CreateServiceProvider → GetAccessTokenAsSecretText`, `InitializeAddinToken → GetAccessTokenAsSecretText`, `IsUserReadyForPowerBI → GetAccessTokenAsSecretText`, …)
- [Codeunit 6324 "Power BI Url Mgt"](../codeunit/6324.md) (3 calls: `CreateServiceProvider → GetPowerBIApiUrl`, `GetPowerBIResourceUrl → GetPowerBIResourceUrl`, `GetReportsUrl → GetPowerBIReportsUrl`)
- [Codeunit 152 "User Permissions"](../codeunit/152.md) (1 call: `IsUserAdminForPowerBI → IsSuper`)
- [Codeunit 6321 "Power BI Rest Service Provider"](../codeunit/6321.md) (1 call: `CreateServiceProvider → Initialize`)
- [Codeunit 8703 "Feature Telemetry"](../codeunit/8703.md) (1 call: `LogEmbedError → LogError`)
- [Codeunit 9170 "Conf./Personalization Mgt."](../codeunit/9170.md) (1 call: `GetEnglishContext → GetCurrentProfileNoError`)

## Called by

- [Page 6327 "Power BI Embed Setup Wizard"](../page/6327.md) (9 calls: `CalculateNextStep → GetPowerBiTelemetryCategory`, `OnOpenPage → CheckPowerBITablePermissions`, `OnOpenPage → GetPowerBiTelemetryCategory`, …)
- [Codeunit 6319 "Power BI Workspace Mgt."](../codeunit/6319.md) (7 calls: `AddPersonalWorkspace → GetReportsUrl`, `AddReportsForWorkspace → CreateServiceProvider`, `AddReportsForWorkspace → GetPowerBiTelemetryCategory`, …)
- [Page 6325 "Power BI Embedded Report Part"](../page/6325.md) (7 calls: `LoadOptInImage → GetPowerBiTelemetryCategory`, `OnFindRecord → GetEnglishContext`, `OnInit → IsUserAdminForPowerBI`, …)
- [Codeunit 6334 "Power BI Upload Step Runner"](../codeunit/6334.md) (5 calls: `GetImport → GetPowerBiTelemetryCategory`, `OnRun → CreateServiceProvider`, `RefreshDataset → GetPowerBiTelemetryCategory`, …)
- [Codeunit 6320 "Power BI Filter Helper"](../codeunit/6320.md) (3 calls: `AddToJsonArray → GetPowerBiTelemetryCategory`, `FindFirstFilter → GetPowerBiTelemetryCategory`, `IsSupportedFilterValuesCount → GetPowerBiTelemetryCategory`)
- [Page 6320 "Upload Power BI Report"](../page/6320.md) (3 calls: `OnClosePage → SynchronizeReportsInBackground`, `OnOpenPage → IsUserAdminForPowerBI`, `OnOpenPage → IsUserReadyForPowerBI`)
- [Page 6324 "Power BI Element Addin Host"](../page/6324.md) (3 calls: `InitializeAddIn → GetPowerBiFeatureTelemetryName`, `InitializeAddIn → InitializeAddinToken`, `OnOpenPage → IsUserReadyForPowerBI`)
- [Codeunit 6327 "Power BI Report Aggregator"](../codeunit/6327.md) (2 calls: `GetPowerBIBlob → GetPowerBiTelemetryCategory`, `LoadOutOfTheBoxReports → GetPowerBiTelemetryCategory`)
- [Codeunit 6349 "PBI Deploy. Upload Tracker"](../codeunit/6349.md) (2 calls: `Save → GetPowerBiTelemetryCategory`, `TransitionTo → GetPowerBiTelemetryCategory`)
- [Page 6322 "Power BI WS Report Selection"](../page/6322.md) (2 calls: `ShowLatestErrorMessage → GetGenericError`, `ShowLatestErrorMessage → GetPowerBiTelemetryCategory`)
- [Codeunit 6302 "Power BI Label Mgt."](../codeunit/6302.md) (1 call: `GetReportLabelsForUserLanguage → GetPowerBiTelemetryCategory`)
- [Codeunit 6322 "Power BI System Upload Tracker"](../codeunit/6322.md) (1 call: `Save → GetPowerBiTelemetryCategory`)
- [Codeunit 6323 "Power BI System Table Report"](../codeunit/6323.md) (1 call: `FinalizeUpload → GetPowerBiTelemetryCategory`)
- [Codeunit 6325 "Power BI Report Synchronizer"](../codeunit/6325.md) (1 call: `OnRun → GetPowerBiTelemetryCategory`)
- [Page 6321 "Power BI Deployments"](../page/6321.md) (1 call: `OnInit → IsUserAdminForPowerBI`)
- [Page 6347 "Power BI Report Deployments"](../page/6347.md) (1 call: `QueueAndSynchronize → SynchronizeReportsInBackground`)
- [Table 6304 "Power BI User Configuration"](../table/6304.md) (1 call: `CreateOrReadForCurrentUser → GetEnglishContext`)
- [Table 6316 "Power BI Deployment"](../table/6316.md) (1 call: `FailCurrentStep → GetPowerBiTelemetryCategory`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-26, BC28

## Deprecations

- procedure GetFactboxRatio: Pending 27.0 (#if not CLEAN27), "This function is now deprecated, and the client decides the addin ratio instead."
- procedure GetMainPageRatio: Pending 27.0 (#if not CLEAN27), "This function is now deprecated, and the client decides the addin ratio instead."

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Power BI Service Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
