次の方法で共有


admin Package

Admin API module for Microsoft Fabric.

This module provides functions to interact with Microsoft Fabric Admin APIs for managing workspaces, users, and other administrative tasks.

Functions

add_user_to_workspace

Grant user permissions to the specified workspace.

Note

This function wraps the Power BI REST API

Admin - Groups AddUserAsAdmin.

add_user_to_workspace(user: str | UUID, role: str = 'Member', principal_type: str = 'User', workspace: str | UUID | None = None, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
user
Required
str or UUID

The user identifier or email address. For service principals and groups, use the identifier (ID).

role
str

The role to assign to the user. Options: 'Admin', 'Contributor', 'Member', 'None', 'Viewer'.

Default value: Member
principal_type
str

The principal type of the user. Options: 'App', 'Group', 'None', 'User'.

Default value: User
workspace
str or UUID

The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If an invalid role or principal type is provided.

If the workspace cannot be found.

assign_domain_workspaces

Assign workspaces to a domain.

This function assigns one or more workspaces to the specified domain. Requires admin permissions to assign domain workspaces.

Note

This function wraps the Fabric REST API

Domains - Assign Domain Workspaces By Ids.

assign_domain_workspaces(domain: str | UUID, workspaces: str | UUID | List[str | UUID], verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
domain
Required
str or UUID

The domain name or ID.

workspaces
Required
str, UUID or list

The workspace name(s) or ID(s) to assign to the domain.

verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the domain cannot be found.

If any of the specified workspaces are not found.

assign_domain_workspaces_by_capacities

Assign all workspaces from specified capacities to a domain.

This function assigns all workspaces that reside on the specified capacities to the specified domain. Requires admin permissions.

Note

This function wraps the Fabric REST API

Domains - Assign Domain Workspaces By Capacities.

assign_domain_workspaces_by_capacities(domain: str | UUID, capacities: str | UUID | List[str | UUID], lro_config: LroConfig | None = None, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
domain
Required
str or UUID

The domain name or ID.

capacities
Required
str, UUID or list

The capacity name(s) or ID(s) whose workspaces should be assigned.

lro_config
<xref:sempy.fabric.admin.LroConfig>

Options to control long-running operation polling. See LroConfig for available keys and defaults.

Default value: None
verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the domain cannot be found.

If any of the specified capacities are not found.

assign_workspaces_to_capacity

Assign workspaces to a capacity.

Note

This function wraps the Power BI REST API

Admin - Capacities AssignWorkspacesToCapacity.

assign_workspaces_to_capacity(target_capacity: str | UUID, workspace: str | UUID | List[str | UUID] | None = None, source_capacity: str | UUID | None = None, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
target_capacity
Required
str or UUID

The name or ID of the target capacity.

workspace
str, list of str, UUID or list of UUID

The name(s) or ID(s) of the workspace(s) to assign. If None, all workspaces from source_capacity will be assigned.

Default value: None
source_capacity
str or UUID

The name or ID of the source capacity. Required if workspace is None.

Default value: None
verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If neither workspace nor source_capacity is provided,

If some of the specified workspaces are not found.

If the target or source capacity cannot be found.

bulk_remove_labels

Remove sensitivity labels from Fabric items (Admin API).

Note

This function wraps the Fabric REST API

Admin - Labels Bulk Remove Labels.

bulk_remove_labels(items: List[Dict[str, str | UUID]], credential: TokenCredential | None = None, verbose: int = 0) -> None

Parameters

Name Description
items
Required
List[<xref:Dict>[str, <xref:Union>[str, UUID]]]

A list of dictionaries containing item details. Each dictionary must have an item key (name or ID) and a type key. When using names, a workspace key is also required. When item is a UUID object, item resolution is skipped.

Example:


   [
       {"item": UUID("fe472f5e-636e-4c10-a1c6-7e9edc0b542a"), "type": "Dashboard"},
       {"item": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a", "type": "Dashboard"},
       {"item": "Sales Report", "type": "Report", "workspace": "Sales Workspace"},
   ]
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None
verbose
int

If greater than 0, print status messages.

Default value: 0

bulk_set_labels

Set sensitivity labels on Fabric items (Admin API).

Note

This function wraps the Fabric REST API

Admin - Labels Bulk Set Labels.

bulk_set_labels(items: List[Dict[str, str | UUID]], label_id: str | UUID, assignment_method: Literal['Standard', 'Priviledged'] = 'Standard', delegated_principal: Dict[str, Any] | None = None, credential: TokenCredential | None = None, verbose: int = 0) -> None

Parameters

Name Description
items
Required
List[<xref:Dict>[str, <xref:Union>[str, UUID]]]

A list of dictionaries containing item details. Each dictionary must have an item key (name or ID) and a type key. When using names, a workspace key is also required. When item is a UUID object, item resolution is skipped.

Example:


   [
       {"item": UUID("fe472f5e-636e-4c10-a1c6-7e9edc0b542a"), "type": "Dashboard"},
       {"item": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a", "type": "Dashboard"},
       {"item": "Sales Report", "type": "Report", "workspace": "Sales Workspace"},
   ]
label_id
Required
str or UUID

The sensitivity label ID. Must be in the user's label policy.

assignment_method
<xref:Literal>[<xref:”Standard”, "Priviledged"]

Specifies whether the assigned label was set by a standard or privileged process.

Default value: Standard
delegated_principal
<xref:Dict>[str, <xref:Any>]

The service principal object used for delegated operations. When provided, it is included in the request payload as delegatedPrincipal.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None
verbose
int

If greater than 0, print status messages.

Default value: 0

Exceptions

Type Description

If assignment_method is not "Standard" or "Priviledged".

create_domain

Create a new domain.

This function creates a new domain in the tenant. Requires admin permissions to create domains.

Note

This function wraps the Fabric REST API

Domains - Create Domain.

create_domain(domain_name: str, description: str | None = None, parent_domain: str | UUID | None = None, verbose: int = 0, credential: TokenCredential | None = None) -> str

Parameters

Name Description
domain_name
Required
str

The domain name.

description
str

The domain description.

Default value: None
parent_domain
str or UUID

The parent domain name or ID. If specified, creates a subdomain.

Default value: None
verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The ID of the created domain.

Exceptions

Type Description

If the parent domain cannot be found.

create_tags

Create one or more new tags (Admin API).

Each tag name must be 40 characters or less. Tags that already exist are skipped.

Note

This function wraps the Fabric REST API

Admin - Tags Bulk Create Tags.

create_tags(tags: str | List[str], verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
tags
Required
str or List[str]

The name of the tag or tags to create.

verbose
int

If greater than 0, print status messages.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If any tag name exceeds 40 characters.

delete_capacity_tenant_setting_override

Delete a tenant setting override for a capacity.

This function removes the specified tenant setting override from the given capacity. Requires admin permissions.

Note

This function wraps the Fabric REST API

Tenants - Delete Capacity Tenant Setting Override.

delete_capacity_tenant_setting_override(capacity: str | UUID, tenant_setting: str, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
capacity
Required
str or UUID

The capacity name or ID.

tenant_setting
Required
str

The tenant setting name (identifier). Example: "TenantSettingForCapacityDelegatedSwitch".

verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the capacity cannot be found.

If the API request fails.

delete_domain

Delete a domain.

This function deletes an existing domain from the tenant. Requires admin permissions to delete domains.

Note

This function wraps the Fabric REST API

Domains - Delete Domain.

delete_domain(domain: str | UUID, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
domain
Required
str or UUID

The domain name or ID.

verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the domain cannot be found.

delete_tag

Delete a tag (Admin API).

Note

This function wraps the Fabric REST API

Admin - Tags Delete Tag.

delete_tag(tag: str | UUID, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
tag
Required
str or UUID

The name or ID of the tag to delete.

verbose
int

If greater than 0, print status messages.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the tag cannot be found.

delete_user_from_workspace

Remove user permissions from the specified workspace.

Note

This function wraps the Power BI REST API

Admin - Groups DeleteUserAsAdmin.

delete_user_from_workspace(user: str | UUID, workspace: str | UUID | None = None, is_group: bool | None = None, profile_id: str | None = None, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
user
Required
str or UUID

The user identifier or email address. For service principals and groups, use the identifier (ID).

workspace
str or UUID

The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
is_group

Whether the user being deleted is a group. This parameter is required when deleting a group.

Default value: None
profile_id
str

The service principal profile ID to delete.

Default value: None
verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the workspace cannot be found.

export_dataflow

Export a dataflow definition as JSON (Admin API).

Returns the JSON definition of the specified dataflow.

Note

This function wraps the Power BI REST API

Admin - Dataflows ExportDataflowAsAdmin.

export_dataflow(dataflow: str | UUID, workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> dict

Parameters

Name Description
dataflow
Required
str or UUID

The dataflow name or ID.

workspace
str or UUID

The Fabric workspace name or ID. Only used when resolving a dataflow by name.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

The exported dataflow definition as a JSON dictionary.

get_capacity_assignment_status

Get the status of the assignment-to-capacity operation for the specified workspace.

Note

This function wraps the Power BI REST API

Capacities - Groups CapacityAssignmentStatus.

get_capacity_assignment_status(workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
workspace
str or UUID

The workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Status: The assignment status
  • Activity Id: The activity ID
  • Start Time: The start time of the operation
  • End Time: The end time of the operation
  • Capacity Id: The capacity ID
  • Capacity Name: The capacity display name

get_capacity_state

Get the state of a capacity.

get_capacity_state(capacity: str | UUID | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
capacity
str or UUID

The capacity name or ID. Defaults to None which resolves to the capacity of the attached lakehouse or if no lakehouse attached, resolves to the capacity of the current workspace.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The capacity state.

Exceptions

Type Description

If the capacity cannot be found.

get_item

Get a specific Fabric or Power BI item in the tenant (Admin API).

This function returns details of a specific item by name or ID. Requires admin permissions to access item information.

Note

This function wraps the Fabric REST API

Items - Get Item (Admin).

get_item(item: str | UUID, item_type: str | None = None, workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
item
Required
str or UUID

The item name or ID.

item_type
str

The type of item (e.g., "SemanticModel", "Report", "Lakehouse"). Helps narrow down the search when multiple items have the same name. See Item Types.

Default value: None
workspace
str or UUID

The workspace name or ID containing the item. Required when item is specified by name.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with a single row containing the following columns:

  • Item Id: The item ID
  • Item Name: The item name
  • Type: The item type
  • Description: The item description
  • State: The item state
  • Last Updated Date: The last updated date
  • Creator Principal Id: The creator principal ID
  • Creator Principal Display Name: The creator principal display name
  • Creator Principal Type: The creator principal type
  • Creator User Principal Name: The creator user principal name
  • Workspace Id: The workspace ID the item belongs to
  • Capacity Id: The capacity ID the item belongs to

Exceptions

Type Description

If item is specified by name but workspace is not provided. If multiple items match the criteria.

If the item cannot be found.

get_refreshables

Get a list of refreshables for the organization within a capacity.

Power BI retains a seven-day refresh history for each dataset, up to a maximum of sixty refreshes.

Note

This function wraps the Power BI REST API

Admin - Get Refreshables.

get_refreshables(top: int | None = None, expand: str | None = None, filter: str | None = None, skip: int | None = None, capacity: str | UUID | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
top
int

Returns only the first n results.

Default value: None
expand
str

Accepts a comma-separated list of data types, which will be expanded inline in the response. Supports 'capacities' and 'groups'.

Default value: None
filter
str

Returns a subset of results based on OData filter query parameter condition.

Default value: None
skip
int

Skips the first n results. Use with top to fetch results beyond the first 1000.

Default value: None
capacity
str or UUID

The capacity name or ID. If None, returns refreshables for all capacities.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with information about refreshables including workspace, item, capacity, refresh statistics, schedule details, and last refresh information.

Exceptions

Type Description

If the specified capacity cannot be found.

list_access_entities

List permission details for Fabric and Power BI items a user can access.

Returns a list of permission details for Fabric and Power BI items that the specified user can access.

Note

This function wraps the Fabric REST API

Users - List Access Entities.

list_access_entities(user_email_address: str, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
user_email_address
Required
str

The user's email address.

credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Item Id: The item ID
  • Item Name: The item display name
  • Item Type: The type of the item
  • Permissions: The permissions granted to the user
  • Additional Permissions: Any additional permissions

list_activity_events

List audit activity events for a tenant.

Returns a list of audit activity events for a tenant within a specified time window. The start and end times must be within the same UTC day.

Note

This function wraps the Power BI REST API

Admin - Get Activity Events.

list_activity_events(start_time: str, end_time: str, activity: str | None = None, user_id: str | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
start_time
Required
str

Start date and time of the window for audit event results. Must be in ISO 8601 compliant UTC format. Example: "2024-09-25T07:55:00".

end_time
Required
str

End date and time of the window for audit event results. Must be in ISO 8601 compliant UTC format. Example: "2024-09-25T08:55:00".

activity
str

Filter value for activities. Example: 'ViewReport'.

Default value: None
user_id
str

Email address of the user to filter events for. Example: "<xref:mailto:john@contoso.com>".

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Id: The event ID
  • Record Type: The record type
  • Creation Time: The event creation time
  • Operation: The operation name
  • Organization Id: The organization ID
  • User Type: The user type
  • User Key: The user key
  • Workload: The workload name
  • Result Status: The result status
  • User Id: The user ID
  • Client IP: The client IP address
  • User Agent: The user agent string
  • Activity: The activity type
  • Workspace Name: The workspace name
  • Workspace Id: The workspace ID
  • Object Id: The object ID
  • Request Id: The request ID
  • Object Type: The object type
  • Object Display Name: The object display name
  • Experience: The experience type
  • Refresh Enforcement Policy: The refresh enforcement policy
  • Is Success: Whether the operation succeeded
  • Activity Id: The activity ID
  • Item Name: The item name
  • Dataset Name: The dataset name
  • Report Name: The report name
  • Capacity Id: The capacity ID
  • Capacity Name: The capacity name
  • App Name: The app name
  • Dataset Id: The dataset ID
  • Report Id: The report ID
  • Artifact Id: The artifact ID
  • Artifact Name: The artifact name
  • Report Type: The report type
  • App Report Id: The app report ID
  • Distribution Method: The distribution method
  • Consumption Method: The consumption method
  • Artifact Kind: The artifact kind

Exceptions

Type Description

If start_time and end_time are not within the same UTC day.

list_app_users

List users that have access to the specified app (Admin API).

Returns a list of users (including groups and service principals) that have access to the specified app along with their access rights.

Note

This function wraps the Power BI REST API

Admin - Apps GetAppUsersAsAdmin.

list_app_users(app: str | UUID, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
app
Required
str or UUID

The app name or ID.

credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • User Name: The user display name

  • Email Address: The user email address

  • App User Access Right: The access right

  • Identifier: The user identifier

  • Graph Id: The Microsoft Graph ID

  • Principal Type: The type of principal (e.g., "User", "Group", "App")

list_apps

List apps in the organization (Admin API).

Returns a list of apps across the tenant with admin-level visibility.

Note

This function wraps the Power BI REST API

Admin - Apps GetAppsAsAdmin.

list_apps(top: int | None = 1000, skip: int | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
top
int

Returns only the first n results.

Default value: 1000
skip
int

Skips the first n results.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • App Name: The app name

  • App Id: The app ID

  • Description: The app description

  • Published By: The publisher name

  • Last Update: The last update date

list_capacities

List capacities for the organization (Admin API).

This is the admin version of list_capacities that returns all capacities in the tenant that the admin has access to.

Note

This function wraps the Power BI REST API

Admin - Get Capacities As Admin.

list_capacities(capacity: str | UUID | None = None, include_tenant_key: bool = False, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
capacity
str or UUID

Filter to return the capacity with the specific name or ID.

Default value: None
include_tenant_key

If True, obtains the tenant key properties.

Default value: False
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Capacity Id: The capacity ID
  • Capacity Name: The capacity display name
  • Sku: The capacity SKU
  • Region: The capacity region
  • State: The capacity state
  • Admins: List of capacity admins
  • Users: List of capacity users
  • Tenant Key Id: The tenant key ID (only if include_tenant_key=True)
  • Tenant Key Name: The tenant key name (only if include_tenant_key=True)

list_capacity_tenant_settings_overrides

List tenant setting overrides for capacities.

This function returns a list of tenant setting overrides at the capacity level. If a capacity is specified, returns overrides for that specific capacity. Otherwise, returns overrides for all capacities. Requires admin permissions.

list_capacity_tenant_settings_overrides(capacity: str | UUID | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
capacity
str or UUID

The capacity name or ID. If None, returns overrides for all capacities.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Capacity Id: The capacity ID
  • Setting Name: The tenant setting name (identifier)
  • Setting Title: The display title of the setting
  • Setting Enabled: Whether the setting is enabled
  • Can Specify Security Groups: Whether security groups can be specified
  • Enabled Security Groups: List of enabled security groups
  • Tenant Setting Group: The group the setting belongs to
  • Tenant Setting Properties: List of setting properties
  • Delegate To Workspace: Whether delegated to workspace level
  • Delegated From: The source of delegation

Exceptions

Type Description

If the capacity cannot be found.

list_capacity_users

List users that have access to the specified capacity.

Note

This function wraps the Power BI REST API

Admin - Capacities GetCapacityUsersAsAdmin.

list_capacity_users(capacity: str | UUID | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
capacity
str or UUID

The capacity name or ID. Defaults to None which resolves to the capacity of the attached lakehouse or if no lakehouse attached, resolves to the capacity of the current workspace.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • User Name: The display name of the user
  • Email Address: The email address of the user
  • Capacity User Access Right: The access right level
  • Identifier: The user identifier
  • Graph Id: The Microsoft Graph ID
  • Principal Type: The type of principal (User, Group, App)
  • User Type: The user type
  • Profile: The user profile

Exceptions

Type Description

If the capacity cannot be found.

list_dataset_users

List users that have access to the specified dataset (Admin API).

Returns a list of users (including groups and service principals) that have access to the specified dataset along with their access rights.

Note

This function wraps the Power BI REST API

Admin - Datasets GetDatasetUsersAsAdmin.

list_dataset_users(dataset: str | UUID, workspace: str | UUID | None = None, query: str | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
dataset
Required
str or UUID

The dataset name or ID.

workspace
str or UUID

Filter datasets by workspace name or ID. Used when resolving dataset by name to narrow down matches.

Default value: None
query
str

Additional OData filter query to append when resolving dataset by name. For example, "configuredBy eq 'user@example.com'".

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • User Name: The user display name

  • Email Address: The user email address

  • Dataset User Access Right: The access right (e.g., "Read", "ReadWrite")

  • Identifier: The user identifier

  • Graph Id: The Microsoft Graph ID

  • Principal Type: The type of principal (e.g., "User", "Group", "App")

list_datasets

List datasets for the organization (Admin API).

Returns a list of datasets across the tenant with admin-level visibility.

Note

This function wraps the Power BI REST API

Admin - Datasets GetDatasetsAsAdmin.

list_datasets(query: str | None = None, top: int | None = None, skip: int | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
query
str

Returns a subset of results based on OData filter query parameter condition.

Default value: None
top
int

Returns only the first n results.

Default value: None
skip
int

Skips the first n results.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Dataset Id: The dataset ID

  • Dataset Name: The dataset name

  • Web URL: The web URL of the dataset

  • Add Rows API Enabled: Whether the add rows API is enabled

  • Configured By: The user who configured the dataset

  • Is Refreshable: Whether the dataset is refreshable

  • Is Effective Identity Required: Whether effective identity is required

  • Is Effective Identity Roles Required: Whether effective identity roles are required

  • Target Storage Mode: The target storage mode

  • Created Date: The creation date

  • Content Provider Type: The content provider type

  • Create Report Embed URL: The URL to create a report embed

  • QnA Embed URL: The Q&A embed URL

  • Upstream Datasets: List of upstream datasets

  • Users: List of users with access

  • Is In Place Sharing Enabled: Whether in-place sharing is enabled

  • Workspace Id: The workspace ID

  • Auto Sync Read Only Replicas: Whether auto sync for read-only replicas is enabled

  • Max Read Only Replicas: Maximum number of read-only replicas

list_domain_tenant_settings_overrides

List tenant setting overrides for domains.

This function returns a list of tenant setting overrides at the domain level. Requires admin permissions.

Note

This function wraps the Fabric REST API

Tenants - List Domains Tenant Settings Overrides.

list_domain_tenant_settings_overrides(credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Domain Id: The domain ID
  • Setting Name: The tenant setting name (identifier)
  • Title: The display title of the setting
  • Enabled: Whether the setting is enabled
  • Can Specify Security Groups: Whether security groups can be specified
  • Enabled Security Groups: List of enabled security groups
  • Tenant Setting Group: The group the setting belongs to
  • Delegate To Workspace: Whether delegated to workspace level
  • Delegated From: The source of delegation

list_domain_workspaces

List workspaces within a domain (Admin API).

This function returns a list of workspaces assigned to the specified domain. Requires admin permissions to access domain information.

Note

This function wraps the Fabric REST API

Domains - List Domain Workspaces.

list_domain_workspaces(domain: str | UUID, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
domain
Required
str or UUID

The domain name or ID.

credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Workspace Id: The workspace ID
  • Workspace Name: The workspace display name

Exceptions

Type Description

If the domain cannot be found.

list_domains

List domains for the organization (Admin API).

This function returns a list of domains across the tenant. Requires admin permissions to access domain information.

Note

This function wraps the Fabric REST API

Domains - List Domains.

list_domains(domain: str | UUID | None = None, non_empty_only: bool = False, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
domain
str or UUID

Filter to return the domain with the specific name or ID.

Default value: None
non_empty_only

When True, only return domains that have at least one workspace containing an item. Defaults to False.

Default value: False
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Domain Id: The domain ID
  • Domain Name: The domain display name
  • Description: The domain description
  • Parent Domain Id: The parent domain ID (for subdomains)
  • Contributors Scope: The contributors scope type

list_external_data_shares

List external data shares in the tenant (Admin API).

Returns a list of external data shares across the tenant with creator, recipient, status, and expiration information.

Note

This function wraps the Fabric REST API

Admin - External Data Shares Provider List External Data Shares.

list_external_data_shares(credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • External Data Share Id: The external data share ID

  • Paths: The shared paths

  • Creator Principal Id: The creator principal ID

  • Creator Principal Name: The creator display name

  • Creator Principal Type: The creator principal type

  • Creator Details: The type-specific creator principal details

  • Recipient UPN: The recipient user principal name

  • Recipient Tenant Id: The recipient tenant ID

  • Status: The share status

  • Expiration Time UTC: The UTC expiration time

  • Workspace Id: The workspace ID

  • Item Id: The item ID

  • Invitation URL: The invitation URL

list_git_connections

List Git connections across workspaces (Admin API).

Returns a list of Git connections configured on workspaces in the tenant, including organization, project, repository, branch, and directory information.

Note

This function wraps the Fabric REST API

Admin - Workspaces List Git Connections.

list_git_connections(credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Workspace Id: The workspace ID

  • Git Provider Type: The type of Git provider (e.g., AzureDevOps, GitHub)

  • Repository Name: The repository name

  • Branch Name: The branch name

  • Directory Name: The directory name

  • Extra Properties: Provider-specific properties as a dict (e.g., organizationName/projectName for AzureDevOps, ownerName for GitHub)

list_item_access_details

List users and their permissions for a specific item (Admin API).

This function returns a list of users (including groups and service principals) that have access to the specified item, along with their permissions.

Note

This function wraps the Fabric REST API

Items - List Item Access Details (Admin).

list_item_access_details(item: str | UUID, item_type: str, workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
item
Required
str or UUID

The item name or ID.

item_type
Required
str

The type of item (e.g., "SemanticModel", "Report", "Lakehouse"). See Item Types.

workspace
str or UUID

The workspace name or ID containing the item. Required when item is specified by name. If None, searches across all workspaces (only valid when item is a UUID).

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • User Id: The user/group/service principal ID
  • User Name: The user/group/service principal display name
  • User Type: The type of principal (e.g., "User", "Group", "ServicePrincipal")
  • User Principal Name: The user principal name (for users)
  • Item Name: The item name
  • Item Type: The item type
  • Item Id: The item ID
  • Permissions: The permissions granted to the user
  • Additional Permissions: Any additional permissions

Exceptions

Type Description

If item is specified by name but workspace is not provided.

If the item cannot be found.

If the API request fails.

list_items

List all Fabric and Power BI items in the tenant (Admin API).

This function returns a list of active Fabric and Power BI items across the tenant. Requires admin permissions to access item information.

Note

This function wraps the Fabric REST API

Items - List Items (Admin).

list_items(capacity: str | UUID | None = None, workspace: str | UUID | None = None, state: str | None = None, item: str | UUID | None = None, item_type: str | None = None, top_n: int | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
capacity
str or UUID

Filter items by capacity name or ID.

Default value: None
workspace
str or UUID

Filter items by workspace name or ID. Defaults to None which lists items across all workspaces.

Default value: None
state
str

Filter items by state (e.g., "Active"). See Item States.

Default value: None
item
str or UUID

Filter items by item name or ID. If specified, only items matching this name or ID are returned.

Default value: None
item_type
str

Filter items by type (e.g., "SemanticModel", "Report", "Lakehouse"). See Item Types.

Default value: None
top_n
int

Limit the number of items returned to the top N items. If None, all matching items are returned.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Item Id: The item ID
  • Item Name: The item name
  • Type: The item type
  • Description: The item description
  • State: The item state
  • Last Updated Date: The last updated date
  • Creator Principal Id: The creator principal ID
  • Creator Principal Display Name: The creator principal display name
  • Creator Principal Type: The creator principal type
  • Creator User Principal Name: The creator user principal name
  • Workspace Id: The workspace ID the item belongs to
  • Capacity Id: The capacity ID the item belongs to

list_modified_workspaces

Get a list of workspace IDs that have been modified in the organization.

Note

This function wraps the Power BI REST API

Admin - WorkspaceInfo GetModifiedWorkspaces.

list_modified_workspaces(modified_since: str | None = None, exclude_inactive_workspaces: bool = False, exclude_personal_workspaces: bool = False, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
modified_since
str

Last modified date (must be in ISO compliant UTC format). Example: "2024-11-02T05:51:30" or "2024-11-02T05:51:30.0000000Z".

Default value: None
exclude_inactive_workspaces

Whether to exclude inactive workspaces.

Default value: False
exclude_personal_workspaces

Whether to exclude personal workspaces.

Default value: False
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following column:

  • Workspace Id: The ID of modified workspaces

list_orphaned_workspaces

List orphaned workspaces (those with no users or no admins).

Note

This function wraps the Power BI REST API

Admin - Groups GetGroupsAsAdmin.

list_orphaned_workspaces(top: int = 100, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
top
int

The maximum number of results to return.

Default value: 100
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Workspace Name: The workspace name
  • Workspace Id: The workspace ID
  • Type: The workspace type
  • State: The workspace state
  • Is Read Only: Whether the workspace is read-only
  • Is On Dedicated Capacity: Whether the workspace is on dedicated capacity
  • Capacity Migration Status: The capacity migration status
  • Has Workspace Level Settings: Whether the workspace has workspace level settings
  • Users: List of users with access to the workspace

list_report_subscriptions

List subscriptions for the specified report (Admin API).

Returns a list of report subscriptions along with subscriber details. This is a preview API call.

Note

This function wraps the Power BI REST API

Admin - Reports GetReportSubscriptionsAsAdmin.

list_report_subscriptions(report: str | UUID, workspace: str | UUID | None = None, query: str | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
report
Required
str or UUID

The report name or ID.

workspace
str or UUID

Filter reports by workspace name or ID. Used when resolving report by name to narrow down matches.

Default value: None
query
str

Additional OData filter query to append when resolving report by name. For example, "createdBy eq 'user@example.com'".

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Subscription Id: The subscription ID

  • Title: The subscription title

  • Artifact Id: The artifact ID

  • Artifact Name: The artifact display name

  • Sub Artifact Name: The sub-artifact display name

  • Artifact Type: The artifact type

  • Is Enabled: Whether the subscription is enabled

  • Frequency: The subscription frequency

  • Start Date: The subscription start date

  • End Date: The subscription end date

  • Link To Content: Whether the subscription includes a link to content

  • Preview Image: Whether the subscription includes a preview image

  • Attachment Format: The attachment format

  • Users: List of subscription users

list_report_users

List users that have access to the specified report (Admin API).

Returns a list of users (including groups and service principals) that have access to the specified report along with their access rights.

Note

This function wraps the Power BI REST API

Admin - Reports GetReportUsersAsAdmin.

list_report_users(report: str | UUID, workspace: str | UUID | None = None, query: str | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
report
Required
str or UUID

The report name or ID.

workspace
str or UUID

Filter reports by workspace name or ID. Used when resolving report by name to narrow down matches.

Default value: None
query
str

Additional OData filter query to append when resolving report by name. For example, "createdBy eq 'user@example.com'".

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • User Name: The user display name

  • Email Address: The user email address

  • Report User Access Right: The access right (e.g., "Read", "ReadWrite")

  • Identifier: The user identifier

  • Graph Id: The Microsoft Graph ID

  • Principal Type: The type of principal (e.g., "User", "Group", "App")

list_reports

List reports for the organization (Admin API).

Returns a list of reports across the tenant with admin-level visibility.

Note

This function wraps the Power BI REST API

Admin - Reports GetReportsAsAdmin.

list_reports(top: int | None = None, skip: int | None = None, query: str | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
top
int

Returns only the first n results.

Default value: None
skip
int

Skips the first n results.

Default value: None
query
str

Returns a subset of results based on OData filter query parameter condition.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Report Id: The report ID

  • Report Name: The report name

  • Type: The report type

  • Web URL: The web URL of the report

  • Embed URL: The embed URL of the report

  • Dataset Id: The associated dataset ID

  • Created Date: The creation date

  • Modified Date: The last modified date

  • Created By: The report creator

  • Modified By: The last modifier

  • Sensitivity Label Id: The sensitivity label ID

  • Users: Users with access

  • Subscriptions: Report subscriptions

  • Workspace Id: The workspace ID

  • Report Flags: Report flags

list_tags

List all tags in the tenant (Admin API).

Returns a list of all tags available in the tenant.

Note

This function wraps the Fabric REST API

Admin - Tags List Tags.

list_tags(credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Tag Name: The tag display name

  • Tag Id: The tag ID

list_tenant_keys

List encryption keys for the tenant (Admin API).

Returns the encryption keys configured for the Power BI tenant.

Note

This function wraps the Power BI REST API

Admin - Get Power BI Encryption Keys.

list_tenant_keys(credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Tenant Key Id: The key ID

  • Tenant Key Name: The key name

  • Key Vault Key Identifier: The Azure Key Vault key URI

  • Is Default: Whether this is the default key

  • Created At: When the key was created

  • Updated At: When the key was last updated

list_tenant_settings

List all tenant settings for the organization.

This function returns a list of all tenant settings in the organization. Requires admin permissions.

Note

This function wraps the Fabric REST API

Tenants - List Tenant Settings.

list_tenant_settings(credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Setting Name: The tenant setting name (identifier)
  • Title: The display title of the setting
  • Enabled: Whether the setting is enabled
  • Can Specify Security Groups: Whether security groups can be specified
  • Tenant Setting Group: The group the setting belongs to
  • Enabled Security Groups: List of enabled security groups

list_unused_artifacts

List unused artifacts in a workspace (Admin API).

Returns a list of datasets, reports, and dashboards that have not been used within 30 days for the specified workspace.

Note

This function wraps the Power BI REST API

Admin - Groups GetUnusedArtifactsAsAdmin.

list_unused_artifacts(workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
workspace
str or UUID

The Fabric workspace name or ID. Defaults to the current workspace.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Artifact Name: The artifact display name

  • Artifact Id: The artifact ID

  • Artifact Type: The type of artifact (e.g., Dataset, Report, Dashboard)

  • Artifact Size in MB: The artifact size in megabytes

  • Created Date Time: When the artifact was created

  • Last Accessed Date Time: When the artifact was last accessed

list_user_subscriptions

List subscriptions for the specified user (preview API).

Returns a list of subscriptions for the specified user. This is a preview API.

Note

This function wraps the Power BI REST API

Admin - Users GetUserSubscriptionsAsAdmin.

list_user_subscriptions(user: str | UUID, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
user
Required
str or UUID

The graph ID or user principal name (UPN) of the user.

credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Subscription Id: The subscription ID
  • Title: The subscription title
  • Artifact Id: The artifact ID
  • Artifact Name: The artifact display name
  • Sub Artifact Name: The sub-artifact display name
  • Artifact Type: The type of artifact
  • Is Enabled: Whether the subscription is enabled
  • Frequency: The subscription frequency
  • Start Date: The subscription start date
  • End Date: The subscription end date
  • Link To Content: Whether to include a link to content
  • Preview Image: Whether to include a preview image
  • Attachment Format: The attachment format
  • Users: The list of subscription users

list_widely_shared_artifacts

List widely shared artifacts (Admin API).

Returns a list of Power BI artifacts that are shared with the whole organization through links or published to the web.

list_widely_shared_artifacts(api_name: Literal['LinksSharedToWholeOrganization', 'PublishedToWeb'] = 'LinksSharedToWholeOrganization', credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
api_name
<xref:Literal>[<xref:”LinksSharedToWholeOrganization”, "PublishedToWeb"]

The API variant to call. "LinksSharedToWholeOrganization" returns artifacts shared with the whole organization. "PublishedToWeb" returns artifacts published to the web.

Default value: LinksSharedToWholeOrganization
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Artifact Id: The artifact ID

  • Artifact Name: The artifact display name

  • Artifact Type: The artifact type

  • Access Right: The access right granted

  • Share Type: The type of share

  • Sharer Name: The display name of the sharer

  • Sharer Email Address: The email address of the sharer

  • Sharer Identifier: The identifier of the sharer

  • Sharer Graph Id: The Microsoft Graph ID of the sharer

  • Sharer Principal Type: The principal type of the sharer

  • Sharer Service Principal Profile Name: The display name of the sharer's service principal profile

  • Sharer Service Principal Profile Id: The ID of the sharer's service principal profile

list_workspace_access_details

List users (including groups and Service Principals) that have access to the specified workspace.

Note

This function wraps the Fabric REST API

Workspaces - List Workspace Access Details.

list_workspace_access_details(workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
workspace
str or UUID

The workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • User Id: The user/principal ID
  • User Name: The display name
  • User Type: The principal type (User, Group, ServicePrincipal, ServicePrincipalProfile, etc.)
  • User Details: Additional details about the user/principal
  • Workspace Name: The workspace name
  • Workspace Id: The workspace ID
  • Workspace Role: The role assigned to the user

Exceptions

Type Description

If the workspace cannot be found.

list_workspace_tenant_settings_overrides

List tenant setting overrides for workspaces.

This function returns a list of tenant setting overrides at the workspace level. Requires admin permissions.

Note

This function wraps the Fabric REST API

Tenants - List Workspaces Tenant Settings Overrides.

-[ Notes ]-

In order to retrieve workspace delegation settings, you must enable the workspace's delegated OneLake settings. Navigate to the workspace -> Workspace Settings -> Delegated Settings -> OneLake settings -> Set to 'On'.

list_workspace_tenant_settings_overrides(credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Workspace Id: The workspace ID
  • Setting Name: The tenant setting name (identifier)
  • Title: The display title of the setting
  • Enabled: Whether the setting is enabled
  • Can Specify Security Groups: Whether security groups can be specified
  • Enabled Security Groups: List of enabled security groups
  • Tenant Setting Group: The group the setting belongs to
  • Delegated From: The source of delegation

list_workspace_users

List users that have access to the specified workspace.

Note

This function wraps the Power BI REST API

Admin - Groups GetGroupUsersAsAdmin.

list_workspace_users(workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
workspace
str or UUID

The workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • User Name: The display name of the user
  • Email Address: The email address of the user
  • Group User Access Right: The access right level
  • Identifier: The user identifier
  • Graph Id: The Microsoft Graph ID
  • Principal Type: The type of principal (User, Group, App)

Exceptions

Type Description

If the workspace cannot be found.

list_workspaces

List workspaces for the organization (Admin API).

This is the admin version of list_workspaces that returns all workspaces in the tenant that the admin has access to.

Note

This function wraps the Fabric REST API

Workspaces - List Workspaces (Admin).

list_workspaces(capacity: str | UUID | None = None, workspace: str | UUID | None = None, workspace_state: str | None = None, workspace_type: str | None = None, credential: TokenCredential | None = None) -> DataFrame

Parameters

Name Description
capacity
str or UUID

Filter to return only workspaces in the specified capacity.

Default value: None
workspace
str or UUID

Filter to return the workspace with the specific name or ID.

Default value: None
workspace_state
str

Filter to return only workspaces with the specified state (e.g. "Active", "Deleted"). See Workspace States.

Default value: None
workspace_type
str

Filter to return only workspaces of the specified type (e.g. "Personal", "Workspace", "AdminWorkspace"). See Workspace Types.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

A DataFrame with the following columns:

  • Id: The workspace ID
  • Name: The workspace name
  • State: The workspace state
  • Type: The workspace type
  • Capacity Id: The capacity ID the workspace is assigned to

patch_capacity

Change specific capacity information.

Currently, this API call only supports changing the capacity's encryption key.

Note

This function wraps the Power BI REST API

Admin - Patch Capacity As Admin.

patch_capacity(capacity: str | UUID, tenant_key_id: str | UUID, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
capacity
Required
str or UUID

The capacity name or ID.

tenant_key_id
Required
str or UUID

The ID of the encryption key.

verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the capacity cannot be found.

Delete all organization sharing links for all Fabric items in the tenant (Admin API).

This action cannot be undone.

Note

This function wraps the Fabric REST API

Admin - Sharing Links Remove All Sharing Links.

remove_all_sharing_links(sharing_link_type: str = 'OrgLink', lro_config: LroConfig | None = None, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
sharing_link_type
str

Specifies the type of sharing link to delete. Additional sharing link types may be added over time. See SharingLinkType for all available types.

Default value: OrgLink
lro_config
<xref:sempy.fabric.admin.LroConfig>

Options to control long-running operation polling. See LroConfig for available keys and defaults.

Default value: None
verbose
int

If greater than 0, print status messages.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Delete organization sharing links for the specified Fabric items (Admin API).

This action cannot be undone.

Note

This function wraps the Fabric REST API

Admin - Sharing Links Bulk Remove Sharing Links.

remove_sharing_links(items: List[Dict[str, str | UUID]], sharing_link_type: str = 'OrgLink', lro_config: LroConfig | None = None, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
items
Required
List[<xref:Dict>[str, <xref:Union>[str, UUID]]]

A list of dictionaries, each representing an item. The item field accepts either a name or ID. The type field specifies the item type. The workspace field is required when resolving items by name. When item is a UUID object, item resolution is skipped.

Example:


   [
       {"item": UUID("fe472f5e-636e-4c10-a1c6-7e9edc0b542a"), "type": "Report"},
       {"item": "MyReport", "type": "Report", "workspace": "Workspace 1"},
       {"item": "fe472f5e-636e-4c10-a1c6-7e9edc0b542a", "type": "Report"},
   ]
sharing_link_type
str

Specifies the type of sharing link to delete. See SharingLinkType for all available types.

Default value: OrgLink
lro_config
<xref:sempy.fabric.admin.LroConfig>

Options to control long-running operation polling. See LroConfig for available keys and defaults.

Default value: None
verbose
int

If greater than 0, print status messages.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

resolve_capacity_id

Resolve a capacity name or ID to its capacity ID.

This function uses admin APIs to resolve capacity information, which can access any capacity in the tenant.

resolve_capacity_id(capacity: str | UUID | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
capacity
str or UUID

The capacity name or ID. Defaults to None which resolves to the capacity of the attached lakehouse or if no lakehouse attached, resolves to the capacity of the current workspace.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The capacity ID.

Exceptions

Type Description

If the capacity cannot be found.

resolve_capacity_name

Resolve a capacity name or ID to its capacity name.

This function uses admin APIs to resolve capacity information, which can access any capacity in the tenant.

resolve_capacity_name(capacity: str | UUID | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
capacity
str or UUID

The capacity name or ID. Defaults to None which resolves to the capacity of the attached lakehouse or if no lakehouse attached, resolves to the capacity of the current workspace.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The capacity name.

Exceptions

Type Description

If the capacity cannot be found.

resolve_dataset_id

Resolve a dataset name or ID to its dataset ID (Admin API).

This function uses admin APIs to resolve dataset information, which can access any dataset in the tenant.

resolve_dataset_id(dataset: str | UUID, workspace: str | UUID | None = None, query: str | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
dataset
Required
str or UUID

The dataset name or ID.

workspace
str or UUID

Filter datasets by workspace name or ID.

Default value: None
query
str

Additional OData filter query to append. For example, "configuredBy eq 'user@example.com'".

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The dataset ID.

Exceptions

Type Description

If the dataset cannot be found.

resolve_dataset_name

Resolve a dataset ID to its dataset name (Admin API).

This function uses admin APIs to resolve dataset information, which can access any dataset in the tenant.

resolve_dataset_name(dataset: str | UUID, workspace: str | UUID | None = None, query: str | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
dataset
Required
str or UUID

The dataset name or ID.

workspace
str or UUID

Filter datasets by workspace name or ID.

Default value: None
query
str

Additional OData filter query to append. For example, "configuredBy eq 'user@example.com'".

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The dataset name.

Exceptions

Type Description

If the dataset cannot be found.

resolve_domain_id

Resolve a domain name or ID to its domain ID.

This function uses admin APIs to resolve domain information, which can access any domain in the tenant.

resolve_domain_id(domain: str | UUID, credential: TokenCredential | None = None) -> str

Parameters

Name Description
domain
Required
str or UUID

The domain name or ID.

credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The domain ID.

Exceptions

Type Description

If the domain cannot be found.

resolve_domain_name

Resolve a domain name or ID to its domain name.

This function uses admin APIs to resolve domain information, which can access any domain in the tenant.

resolve_domain_name(domain: str | UUID, credential: TokenCredential | None = None) -> str

Parameters

Name Description
domain
Required
str or UUID

The domain name or ID.

credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The domain name.

Exceptions

Type Description

If the domain cannot be found.

resolve_item_id

Resolve an item name or ID to its item ID (Admin API).

This function uses admin APIs to resolve item information, which can access any item in the tenant.

resolve_item_id(item: str | UUID, item_type: str | None = None, workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
item
Required
str or UUID

The item name or ID.

item_type
str

The type of item (e.g., "SemanticModel", "Report", "Lakehouse"). Required when item is specified by name to narrow down the search.

Default value: None
workspace
str or UUID

The workspace name or ID containing the item. Helps narrow down the search when multiple items have the same name.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The item ID.

Exceptions

Type Description

If multiple items match the criteria and more specific parameters are needed.

If the item cannot be found.

resolve_item_name

Resolve an item ID to its item name (Admin API).

This function uses admin APIs to resolve item information, which can access any item in the tenant.

resolve_item_name(item: str | UUID, item_type: str | None = None, workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
item
Required
str or UUID

The item name or ID.

item_type
str

The type of item (e.g., "SemanticModel", "Report", "Lakehouse"). Required when item is specified by name to narrow down the search.

Default value: None
workspace
str or UUID

The workspace name or ID containing the item. Helps narrow down the search when multiple items have the same name.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The item name.

Exceptions

Type Description

If multiple items match the criteria and more specific parameters are needed.

If the item cannot be found.

resolve_report_id

Resolve a report name or ID to its report ID (Admin API).

This function uses admin APIs to resolve report information, which can access any report in the tenant.

resolve_report_id(report: str | UUID, workspace: str | UUID | None = None, query: str | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
report
Required
str or UUID

The report name or ID.

workspace
str or UUID

Filter reports by workspace name or ID.

Default value: None
query
str

Additional OData filter query to append. For example, "createdBy eq 'user@example.com'".

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The report ID.

Exceptions

Type Description

If the report cannot be found.

resolve_report_name

Resolve a report ID to its report name (Admin API).

This function uses admin APIs to resolve report information, which can access any report in the tenant.

resolve_report_name(report: str | UUID, workspace: str | UUID | None = None, query: str | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
report
Required
str or UUID

The report name or ID.

workspace
str or UUID

Filter reports by workspace name or ID.

Default value: None
query
str

Additional OData filter query to append. For example, "createdBy eq 'user@example.com'".

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The report name.

Exceptions

Type Description

If the report cannot be found.

resolve_workspace_id

Resolve a workspace name or ID to its workspace ID.

This function uses admin APIs to resolve workspace information, which can access any workspace in the tenant.

resolve_workspace_id(workspace: str | UUID | None = None, capacity: str | UUID | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
workspace
str or UUID

The workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
capacity
str or UUID

The capacity name or ID to resolve the workspace against. Defaults to None which resolves across all capacities. Should only be set when workspace is not None.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The workspace ID.

Exceptions

Type Description

If capacity is provided but workspace is None.

If the workspace cannot be found.

resolve_workspace_name

Resolve a workspace name or ID to its workspace name.

This function uses admin APIs to resolve workspace information, which can access any workspace in the tenant.

resolve_workspace_name(workspace: str | UUID | None = None, capacity: str | UUID | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
workspace
str or UUID

The workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
capacity
str or UUID

The capacity name or ID to resolve the workspace against. Defaults to None which resolves across all capacities. Should only be set when workspace is not None.

Default value: None
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The workspace name.

Exceptions

Type Description

If capacity is provided but workspace is None.

If the workspace cannot be found.

restore_deleted_workspace

Restore a deleted workspace.

Note

This function wraps the Fabric REST API

Workspaces - Restore Workspace.

restore_deleted_workspace(workspace_id: str | UUID, name: str, email_address: str, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
workspace_id
Required
str or UUID

The ID of the workspace to restore.

name
Required
str

The name to assign to the restored workspace.

email_address
Required
str

The email address of the owner of the workspace to be restored.

verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

revoke_external_data_share

Revoke an external data share (Admin API).

Revokes the specified external data share. This action cannot be undone.

Note

This function wraps the Fabric REST API

Admin - External Data Shares Provider Revoke External Data Share.

revoke_external_data_share(external_data_share_id: str | UUID, item_id: str | UUID, workspace: str | UUID, credential: TokenCredential | None = None, verbose: int = 0) -> None

Parameters

Name Description
external_data_share_id
Required
str or UUID

The external data share ID.

item_id
Required
str or UUID

The item ID.

workspace
Required
str or UUID

The Fabric workspace name or ID.

credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None
verbose
int

If greater than 0, print status messages.

Default value: 0

rotate_tenant_key

Rotate an encryption key for Power BI workspaces assigned to a capacity (Admin API).

Note

This function wraps the Power BI REST API

Admin - Rotate Power BI Encryption Key.

rotate_tenant_key(tenant_key_id: str | UUID, key_vault_key_identifier: str, credential: TokenCredential | None = None, verbose: int = 0) -> None

Parameters

Name Description
tenant_key_id
Required
str or UUID

The tenant key ID.

key_vault_key_identifier
Required
str

The URI that uniquely specifies the encryption key in Azure Key Vault.

credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None
verbose
int

If greater than 0, print status messages.

Default value: 0

scan_workspaces

Scan one or more workspaces and return metadata scan results.

This function initiates a workspace scan, polls for completion, and returns the scan results. It wraps three Power BI REST APIs in a single call.

scan_workspaces(data_source_details: bool = False, dataset_schema: bool = False, dataset_expressions: bool = False, lineage: bool = False, artifact_users: bool = False, workspace: str | List[str] | UUID | List[UUID] | None = None, return_dataframe: bool = True, retry_after_seconds: float = 1.0, timeout_seconds: float = 120.0, backoff_factor: float = 2.0, credential: TokenCredential | None = None) -> DataFrame | dict

Parameters

Name Description
data_source_details

Whether to return data source details. Requires metadata scanning to be fully enabled in the tenant.

Default value: False
dataset_schema

Whether to return dataset schema (tables, columns and measures). Requires metadata scanning to be fully enabled in the tenant.

Default value: False
dataset_expressions

Whether to return dataset expressions (DAX and Mashup queries). Requires metadata scanning to be fully enabled in the tenant.

Default value: False
lineage

Whether to return lineage info (upstream dataflows, tiles, data source IDs).

Default value: False
artifact_users

Whether to return user details for Power BI items (such as reports or dashboards).

Default value: False
workspace
str, list of str, UUID or list of UUID

The workspace name(s) or ID(s) to scan. Supports up to 100 workspaces. Only IDs in GUID format are sent to the API; names are resolved to IDs. If None, scans the default workspace from the environment context.

Default value: None
return_dataframe

If True, returns a pandas DataFrame with primitive fields as columns and object fields (reports, dashboards, datasets, etc.) as dict columns. If False, returns the raw JSON dict from the API.

Default value: True
retry_after_seconds

Initial polling interval in seconds between status checks. Subsequent intervals will be multiplied by backoff_factor for exponential backoff.

Default value: 1.0
timeout_seconds

Maximum total wait time in seconds for the scan to complete.

Default value: 120.0
backoff_factor

Multiplier applied to the polling interval after each status check. Set to 1.0 for constant polling, >1.0 for exponential backoff.

Default value: 2.0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description

If return_dataframe is True: A DataFrame with primitive workspace fields as columns and object fields (Reports, Dashboards, Datasets, Dataflows, Datamarts, Users) as dict/list column types.

If return_dataframe is False: The raw scan result dictionary from the API.

Exceptions

Type Description

If more than 100 workspaces are provided.

If the scan does not complete within timeout_seconds

If the scan initiation, status check, or result retrieval fails.

sync_role_assignments_to_subdomains

Sync role assignments from a domain to its subdomains.

This function synchronizes the role assignments from the specified domain to all of its subdomains. Requires admin permissions.

Note

This function wraps the Fabric REST API

Domains - Sync Role Assignments To Subdomains.

sync_role_assignments_to_subdomains(domain: str | UUID, role: Literal['Admin', 'Contributor'], verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
domain
Required
str or UUID

The domain name or ID.

role
Required
str

The role to sync. Valid values: 'Admin', 'Contributor'.

verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If an invalid role is specified.

If the domain cannot be found.

unassign_all_domain_workspaces

Unassign all workspaces from a domain.

This function unassigns all workspaces from the specified domain. Requires admin permissions to unassign domain workspaces.

Note

This function wraps the Fabric REST API

Domains - Unassign All Domain Workspaces.

unassign_all_domain_workspaces(domain: str | UUID, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
domain
Required
str or UUID

The domain name or ID.

verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the domain cannot be found.

unassign_domain_workspaces

Unassign workspaces from a domain.

This function unassigns one or more workspaces from the specified domain. Requires admin permissions to unassign domain workspaces.

Note

This function wraps the Fabric REST API

Domains - Unassign Domain Workspaces By Ids.

unassign_domain_workspaces(domain: str | UUID, workspaces: str | UUID | List[str | UUID], verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
domain
Required
str or UUID

The domain name or ID.

workspaces
Required
str, UUID or list

The workspace name(s) or ID(s) to unassign from the domain.

verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the domain cannot be found.

If any of the specified workspaces are not found.

unassign_workspaces_from_capacity

Unassign workspaces from their capacity.

Note

This function wraps the Power BI REST API

Admin - Capacities UnassignWorkspacesFromCapacity.

unassign_workspaces_from_capacity(workspaces: str | UUID | List[str | UUID], verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
workspaces
Required
str, list of str, UUID or list of UUID

The workspace name(s) or ID(s) to unassign.

verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If some of the specified workspaces are not found.

update_capacity_tenant_setting_override

Update a tenant setting override for a capacity.

This function updates the specified tenant setting override for the given capacity. Requires admin permissions.

Note

This function wraps the Fabric REST API

Tenants - Update Capacity Tenant Setting Override.

update_capacity_tenant_setting_override(capacity: str | UUID, tenant_setting: str, enabled: bool, delegate_to_workspace: bool | None = None, enabled_security_groups: List[Dict[str, str]] | None = None, excluded_security_groups: List[Dict[str, str]] | None = None, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
capacity
Required
str or UUID

The capacity name or ID.

tenant_setting
Required
str

The tenant setting name (identifier). Example: "TenantSettingForCapacityDelegatedSwitch".

enabled
Required

The status of the tenant setting. False - Disabled, True - Enabled.

delegate_to_workspace

Indicates whether the tenant setting can be delegated to a workspace admin. False - Workspace admin cannot override. True - Workspace admin can override.

Default value: None
enabled_security_groups
list of dict

A list of enabled security groups. Each dict should contain 'graphId' and 'name'. Example: [{"graphId": "f51b705f-...", "name": "SecurityGroup1"}].

Default value: None
excluded_security_groups
list of dict

A list of excluded security groups. Each dict should contain 'graphId' and 'name'. Example: [{"graphId": "f51b705f-...", "name": "SecurityGroup1"}].

Default value: None
verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the capacity cannot be found.

If the API request fails.

update_domain

Update a domain's properties.

This function updates the properties of an existing domain. Requires admin permissions to update domains.

Note

This function wraps the Fabric REST API

Domains - Update Domain.

update_domain(domain: str | UUID, description: str | None = None, contributors_scope: Literal['AdminsOnly', 'AllTenant', 'SpecificUsersAndGroups'] | None = None, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
domain
Required
str or UUID

The domain name or ID.

description
str

The new domain description.

Default value: None
contributors_scope
str

The domain contributor scope. Valid values: 'AdminsOnly', 'AllTenant', 'SpecificUsersAndGroups'.

Default value: None
verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If an invalid contributors_scope is specified.

If the domain cannot be found.

update_tag

Update the name of a tag (Admin API).

Note

This function wraps the Fabric REST API

Admin - Tags Update Tag.

update_tag(name: str, tag: str | UUID, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
name
Required
str

The new name of the tag.

tag
Required
str or UUID

The current name or ID of the tag to update.

verbose
int

If greater than 0, print status messages.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the tag cannot be found.

update_tenant_setting

Update a tenant setting.

This function updates the specified tenant setting. Requires admin permissions.

Note

This function wraps the Fabric REST API

Tenants - Update Tenant Setting.

update_tenant_setting(tenant_setting: str, enabled: bool, delegate_to_capacity: bool | None = None, delegate_to_domain: bool | None = None, delegate_to_workspace: bool | None = None, enabled_security_groups: List[Dict[str, str]] | None = None, excluded_security_groups: List[Dict[str, str]] | None = None, properties: List[Dict[str, str]] | None = None, verbose: int = 0, credential: TokenCredential | None = None) -> None

Parameters

Name Description
tenant_setting
Required
str

The tenant setting name (identifier). Example: "TenantSettingForCapacityDelegatedSwitch".

enabled
Required

The status of the tenant setting. False - Disabled, True - Enabled.

delegate_to_capacity

Indicates whether the tenant setting can be delegated to a capacity admin. False - Capacity admin cannot override. True - Capacity admin can override.

Default value: None
delegate_to_domain

Indicates whether the tenant setting can be delegated to a domain admin. False - Domain admin cannot override. True - Domain admin can override.

Default value: None
delegate_to_workspace

Indicates whether the tenant setting can be delegated to a workspace admin. False - Workspace admin cannot override. True - Workspace admin can override.

Default value: None
enabled_security_groups
list of dict

A list of enabled security groups. Each dict should contain 'graphId' and 'name'. Example: [{"graphId": "f51b705f-...", "name": "SecurityGroup1"}].

Default value: None
excluded_security_groups
list of dict

A list of excluded security groups. Each dict should contain 'graphId' and 'name'. Example: [{"graphId": "f51b705f-...", "name": "SecurityGroup1"}].

Default value: None
properties
list of dict

Tenant setting properties. Each dict should contain 'name', 'value', and 'type'. Example: [{"name": "CreateP2w", "value": "true", "type": "Boolean"}].

Default value: None
verbose
int

If greater than 0, prints informational messages during execution.

Default value: 0
credential
<xref:sempy.fabric.admin.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Exceptions

Type Description

If the API request fails.