---
id: object/codeunit/6319
type: object
title: Codeunit 6319 "Power BI Workspace Mgt."
summary: Codeunit 6319 "Power BI Workspace Mgt." in Base Application (System.Integration.PowerBI). 10 public procedures. Present since at least BC23, still in BC30, changed in BC24, BC29.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "29"
  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: 42438dc0e81117badc97fdd3c2fb4fa52660e9d4e9362da9661dc124fc3d4be5
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Modules/System/PowerBI/Embedding/PowerBIWorkspaceMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Modules/System/PowerBI/Embedding/PowerBIWorkspaceMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/12242
    - change/bcapps/12189
    - change/bcapps/10348
object_type: codeunit
object_id: 6319
name: Power BI Workspace 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"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 12
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 7
  implements: 0
---

# Codeunit 6319 "Power BI Workspace Mgt."

> Codeunit 6319 "Power BI Workspace Mgt." in Base Application (System.Integration.PowerBI). 10 public procedures. Present since at least BC23, still in BC30, changed in BC24, BC29.

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

## Procedures

- `GetMyWorkspaceLabel(): Text[200]`
- `GetTargetWorkspaceDisplayName(): Text[200]`: Returns the name of the Power BI workspace that reports are deployed to for the current company.
- `CheckTargetWorkspaceAllowsDeployment()`
- `GetWritableWorkspaces(var TempPowerBISelectionElement: Record "Power BI Selection Element" temporary)`: Populates the buffer with the workspaces that deployable reports can be deployed to: the "My Workspace" option (represented by a null ID) plus every shared workspace the user can write to
- `LookupTargetWorkspace(var WorkspaceId: Guid; var WorkspaceName: Text[200]): Boolean`: Opens a lookup for the writable Power BI workspaces and returns the selected one. An empty (null) WorkspaceId means "My Workspace".
- `WorkspaceExists(WorkspaceId: Guid): Boolean`: Returns true if the given workspace still exists and the user can write to it. An empty (null) WorkspaceId ("My Workspace") is always considered valid.
- `AddPersonalWorkspace(var TempPowerBISelectionElement: Record "Power BI Selection Element" temporary)`
- `AddSharedWorkspaces(var TempPowerBISelectionElement: Record "Power BI Selection Element" temporary)`
- `GetReportsAndWorkspaces(var TempPowerBISelectionElement: Record "Power BI Selection Element" temporary; EnglishContext: Text[30])`
- `AddReportsForWorkspace(var TempPowerBISelectionElement: Record "Power BI Selection Element" temporary; WorkspaceID: Guid; WorkspaceName: Text[200])`

Plus 2 local procedures.

## 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 6301 "Power BI Service Mgt."](../codeunit/6301.md) (7 calls: `AddPersonalWorkspace → GetReportsUrl`, `AddReportsForWorkspace → CreateServiceProvider`, `AddReportsForWorkspace → GetPowerBiTelemetryCategory`, …)
- [Codeunit 6324 "Power BI Url Mgt"](../codeunit/6324.md) (1 call: `GetReportsUrlForWorkspace → GetPowerBISharedReportsUrl`)
- [Page 6349 "Power BI Workspaces Lookup"](../page/6349.md) (1 call: `LookupTargetWorkspace → (object)`)

## Called by

- [Codeunit 104000 "Upgrade - BaseApp"](../codeunit/104000.md) (1 call: `AddPowerBIWorkspaces → GetMyWorkspaceLabel`)
- [Codeunit 6323 "Power BI System Table Report"](../codeunit/6323.md) (1 call: `FinalizeUpload → GetMyWorkspaceLabel`)
- [Codeunit 6325 "Power BI Report Synchronizer"](../codeunit/6325.md) (1 call: `TargetWorkspaceIsValid → WorkspaceExists`)
- [Codeunit 6349 "PBI Deploy. Upload Tracker"](../codeunit/6349.md) (1 call: `SetTargetWorkspace → GetTargetWorkspaceDisplayName`)
- [Page 1 "Company Information"](../page/1.md) (1 call: `UpdatePowerBIWorkspaceDisplayName → GetTargetWorkspaceDisplayName`)
- [Page 6322 "Power BI WS Report Selection"](../page/6322.md) (1 call: `TryLoadReportsList → GetReportsAndWorkspaces`)
- [Page 6349 "Power BI Workspaces Lookup"](../page/6349.md) (1 call: `Initialize → GetWritableWorkspaces`)

## Recent changes

- 2026-10-05 [#12242 29.x: Removing the restriction of deploying Power BI reports only to evaluation companies](../../changes/bcapps/12242.md) (releases/29.x, BC29, feature)
- 2026-10-02 [#12189 Removing the restriction of deploying Power BI reports only to evaluation companies](../../changes/bcapps/12189.md) (main, BC30, feature)
- 2026-09-10 [#10348 Adding a Power BI workspace to Company Information to be used when deploying reports](../../changes/bcapps/10348.md) (main, BC30, feature)

## Across versions

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

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 Workspace Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
