sempy_labs.admin package
Module contents
- sempy_labs.admin.assign_domain_workspaces(domain_name: str, workspace_names: str | List[str])
Assigns workspaces to the specified domain by workspace.
- sempy_labs.admin.assign_domain_workspaces_by_capacities(domain_name: str, capacity_names: str | List[str])
Assigns all workspaces that reside on the specified capacities to the specified domain.
- sempy_labs.admin.assign_workspaces_to_capacity(source_capacity: str, target_capacity: str, workspace: str | List[str] | None = None)
Assigns a workspace to a capacity. This function is the admin version.
- Parameters:
- sempy_labs.admin.create_domain(domain_name: str, description: str | None = None, parent_domain_name: str | None = None)
Creates a new domain.
- sempy_labs.admin.delete_domain(domain_name: str)
Deletes a domain.
- Parameters:
domain_name (str) – The domain name.
- sempy_labs.admin.list_access_entities(user_email_address: str) DataFrame
Shows a list of permission details for Fabric and PowerBI items the specified user can access.
- Parameters:
user_email_address (str) – The user’s email address.
- Returns:
A pandas dataframe showing a list of permission details for Fabric and PowerBI items the specified user can access.
- Return type:
- sempy_labs.admin.list_activity_events(start_time: str, end_time: str, activity_filter: str | None = None, user_id_filter: str | None = None)
Shows a list of audit activity events for a tenant.
- Parameters:
start_time (str) – Start date and time of the window for audit event results. Example: “2024-09-25T07:55:00”.
end_time (str) – End date and time of the window for audit event results. Example: “2024-09-25T08:55:00”.
activity_filter (str, default=None) – Filter value for activities. Example: ‘viewreport’.
user_id_filter (str, default=None) – Email address of the user.
- Returns:
A pandas dataframe showing a list of audit activity events for a tenant.
- Return type:
- sempy_labs.admin.list_capacities() DataFrame
Shows the a list of capacities and their properties. This function is the admin version.
- Returns:
A pandas dataframe showing the capacities and their properties
- Return type:
- sempy_labs.admin.list_capacities_delegated_tenant_settings(return_dataframe: bool = True) DataFrame | dict | None
Returns list of tenant setting overrides that override at the capacities.
- Parameters:
return_dataframe (bool, default=True) – If True, returns a dataframe. If False, returns a dictionary
- Returns:
A pandas dataframe showing a list of tenant setting overrides that override at the capacities.
- Return type:
- sempy_labs.admin.list_datasets() DataFrame
Shows a list of datasets for the organization.
- Returns:
A pandas dataframe showing a list of datasets for the organization.
- Return type:
- sempy_labs.admin.list_domain_workspaces(domain_name: str) DataFrame
Shows a list of workspaces within the domain.
- Parameters:
domain_name (str) – The domain name.
- Returns:
A pandas dataframe showing a list of workspaces within the domain.
- Return type:
- sempy_labs.admin.list_domains(non_empty_only: bool = False) DataFrame
Shows a list of domains.
- Parameters:
non_empty_only (bool, default=False) – When True, only return domains that have at least one workspace containing an item. Defaults to False.
- Returns:
A pandas dataframe showing a list of the domains.
- Return type:
Lists external data shares in the tenant. This function is for admins.
- Returns:
A pandas dataframe showing a list of external data shares in the tenant.
- Return type:
- sempy_labs.admin.list_item_access_details(item_name: str, type: str, workspace: str | None = None) DataFrame
Returns a list of users (including groups and service principals) and lists their workspace roles.
- Parameters:
- Returns:
A pandas dataframe showing a list of users (including groups and service principals) and lists their workspace roles.
- Return type:
- sempy_labs.admin.list_items(capacity_name: str | None = None, workspace: str | None = None, state: str | None = None, type: str | None = None) DataFrame
Shows a list of active Fabric and PowerBI items.
- Parameters:
capacity_name (str, default=None) – The capacity name.
workspace (str, default=None) – The Fabric workspace name. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.
state (str, default=None) – The item state.
type (str, default=None) – The item type.
- Returns:
A pandas dataframe showing a list of active Fabric and Power BI items.
- Return type:
- sempy_labs.admin.list_tenant_settings() DataFrame
Lists all tenant settings.
- Returns:
A pandas dataframe showing the tenant settings.
- Return type:
- sempy_labs.admin.list_workspace_access_details(workspace: str | UUID | None = None) DataFrame
Shows a list of users (including groups and Service Principals) that have access to the specified workspace.
- Parameters:
workspace (str, default=None) – The Fabric workspace name. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.
- Returns:
A pandas dataframe showing a list of users (including groups and Service Principals) that have access to the specified workspace.
- Return type:
- sempy_labs.admin.list_workspaces(top: int | None = 5000, skip: int | None = None) DataFrame
Lists workspaces for the organization. This function is the admin version of list_workspaces.
- Parameters:
- Returns:
A pandas dataframe showing a list of workspaces for the organization.
- Return type:
- sempy_labs.admin.resolve_domain_id(domain_name: str) UUID
Obtains the domain Id for a given domain name.
- Parameters:
domain_name (str) – The domain name
- Returns:
The domain Id.
- Return type:
UUID
Revokes the specified external data share. Note: This action cannot be undone.
- sempy_labs.admin.unassign_all_domain_workspaces(domain_name: str)
Unassigns all workspaces from the specified domain.
- Parameters:
domain_name (str) – The domain name.
- sempy_labs.admin.unassign_domain_workspaces(domain_name: str, workspace_names: str | List[str])
Unassigns workspaces from the specified domain by workspace.
- sempy_labs.admin.unassign_workspaces_from_capacity(workspaces: str | List[str])
Unassigns workspace(s) from their capacity. This function is the admin version of list_workspaces.
- sempy_labs.admin.update_domain(domain_name: str, description: str | None = None, contributors_scope: str | None = None)
Updates a domain’s properties.
- Parameters:
domain_name (str) – The domain name.
description (str, default=None) – The domain description.
contributors_scope (str, default=None) – The domain contributor scope.