Skip to contents

Returns the Lakehouses, Warehouses, semantic models, notebooks, and other items stored in a workspace. Every item type returned by Fabric's core list API can be represented. Where the package has a specialized R6 subclass, its methods perform the matching query, connection, file, Spark, or job operations; other types remain complete generic FabricItem records

Usage

fabric_items(
  workspace,
  type = NULL,
  detail = FALSE,
  detail_errors = c("record", "abort"),
  recursive = TRUE,
  root_folder_id = NULL,
  include = NULL,
  personal_workspace_tenant_id = NULL,
  personal_workspace_owner = NULL,
  tenant_id = Sys.getenv("FABRICQUERYR_TENANT_ID"),
  client_id = Sys.getenv("FABRICQUERYR_CLIENT_ID", unset =
    "04b07795-8ddb-461a-bbee-02f9e1bf7b46"),
  token = NULL,
  auth_args = list(),
  api_base = .fabric_api_base,
  output = c("r6", "list")
)

Arguments

workspace

Workspace name, ID, or object returned by fabric_workspaces(). A name is convenient for interactive use; an object avoids an extra lookup

type

Optional Fabric API item type, for example "Lakehouse", "Warehouse", "SemanticModel", or "Notebook". Matching is done by Fabric, so use the API spelling. Leave NULL to list all item types

detail

Whether to retrieve connection details as well as names and IDs. This takes more requests and may require additional permissions. For fabric_item(), NULL enriches every supported type except User Data Functions, whose detail endpoint does not support application identities. The typed Semantic Model, GraphQL, and User Data Function helpers also default to lightweight records

detail_errors

What to do if some connection details cannot be read "record" returns the available information and stores an error message with the affected item; "abort" stops the call

recursive

Logical. TRUE includes items inside workspace folders; FALSE lists only items at the workspace root

root_folder_id

Optional Fabric folder GUID used as the root of the listing. With recursive = FALSE, only direct children are returned; with TRUE, nested folders are included

include

Optional character vector of additional item properties to request. Fabric currently documents "DefaultIdentity"; values are sent as the API's comma-separated include query parameter

personal_workspace_tenant_id

Optional Microsoft Entra tenant ID used to build the XMLA endpoint for a Personal workspace

personal_workspace_owner

Optional owner UPN or Entra object ID used to build the XMLA endpoint for a Personal workspace. Microsoft Fabric's workspace API does not return either personal-workspace identifier, so supply this together with personal_workspace_tenant_id when a dax_connection_string is needed for a semantic model in My Workspace

tenant_id

Microsoft Entra tenant ID. Defaults to FABRICQUERYR_TENANT_ID

client_id

Microsoft Entra application/client ID. Defaults to FABRICQUERYR_CLIENT_ID, then the Azure CLI application ID

token

Optional access token or token-provider function. Leave NULL to let 'fabricQueryR' use its normal sign-in flow

auth_args

Additional sign-in options passed to AzureAuth::get_azure_token()

api_base

Fabric REST API base URL. When workspace is an object containing apiEndpoint, that workspace-specific endpoint is used unless api_base is supplied explicitly

output

Discovery record representation. The default "r6" returns R6 objects with type-specific methods. Use "list" when a plain record is specifically required

Value

A list with one item object per match. Every object includes common fields such as id, displayName, type, and workspaceId. With output = "r6", results are FabricItem objects or type-specific subclasses. With output = "list", results are fabric_item lists. With detail = TRUE, both representations include connection details when Fabric makes them available

Details

The caller needs at least access to the workspace (the Viewer role is sufficient for the core list operation). Workload enrichment additionally requires Item.Read.All/Item.ReadWrite.All or the corresponding workload-specific read scope and access to the item Personal-workspace semantic models use Microsoft's v2 XMLA endpoint and require both personal_workspace_tenant_id and personal_workspace_owner

Generic and typed discovery

fabric_items() and workspace$items() are the broad, future-compatible discovery interfaces. Their optional type filter is passed to Fabric, and item types without package-specific methods are returned as FabricItem objects with all service fields, $details(), and $as_list().

The helpers documented in fabric_typed_items are an intentional convenience subset of Fabric's larger and evolving item catalog. A typed helper means that the package knows the item-type spelling and workload Get route; it does not necessarily mean that the result has its own R6 subclass. See fabric_typed_items for the exact support matrix

Examples

if (FALSE) { # \dontrun{
# Start by discovering a workspace instead of copying its ID
workspaces <- fabric_workspaces()
workspace <- workspaces[[1L]]

# `$items()` is the object interface to fabric_items()
items <- workspace$items()
vapply(items, `[[`, character(1), "displayName")

# `$lakehouses()` calls fabric_lakehouses(); `$tables()` calls
# fabric_lakehouse_tables()
lakehouse <- workspace$lakehouses()[[1L]]
lakehouse$tables()
} # }