This is the Microsoft Azure Power BI Embedded Management Client Library for Python, providing client-side functionality to manage Power BI Embedded workspace collections and retrieve workspaces within an Azure subscription. The library is currently at version 3.0.0 and follows the Azure SDK release cadence, with updates typically driven by new features or breaking changes in the underlying Azure API.
pip install azure-mgmt-powerbiembeddedVerified import paths — ran on the pinned version, not inferred.
Initializes the PowerBIEmbeddedManagementClient using `DefaultAzureCredential` for authentication. This example assumes environment variables like `AZURE_SUBSCRIPTION_ID`, `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, and `AZURE_CLIENT_SECRET` are set for authentication. The client is used to manage Azure Power BI Embedded resources. Note that Power BI Embedded A SKUs and Workspace Collections have largely transitioned to Fabric F SKUs.
Migrate to `azure-identity` classes (e.g., `DefaultAzureCredential`) for authentication and update `credentials` parameter to `credential`.
Ensure all arguments passed to model constructors are keyword arguments (e.g., `MyModel(arg_name='value')` instead of `MyModel('value')`).Carefully follow the Azure SDK authentication guide and Power BI Embedded setup instructions for AAD application registration, secret creation, and granting appropriate API permissions and Power BI service roles to the service principal.
For new Power BI embedding solutions, investigate using Azure Fabric capacities and the associated Power BI embedding APIs, rather than relying on the older workspace collection model. This management client primarily interacts with Azure ARM resources, not directly with Power BI content APIs.
Install the package using pip: `pip install azure-mgmt-powerbiembedded`
Migrate your Power BI embedded solution to Power BI Embedded with A SKUs (Power BI Premium capacities) instead of Workspace Collections. The `azure-mgmt-powerbiembedded` library is for the deprecated Workspace Collections. For current Power BI Embedded, you typically interact with the Power BI Service APIs directly, often using libraries like `msal` or `azure-identity` for authentication, and making HTTP requests.
Ensure that the `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, and `AZURE_CLIENT_SECRET` environment variables are correctly configured for your Azure Active Directory application. If using `DefaultAzureCredential`, verify these environment variables or other credential sources are valid. If MFA is an issue, consider using a service principal with app-only authentication or configuring AAD policies to allow direct authentication for specific applications.
Refer to the official documentation or SDK samples for `azure-mgmt-powerbiembedded` version 3.0.0 to understand the correct client object structure and available operations. If migrating from an older version, be aware that `credential` parameter was renamed from `credentials` and operations that returned `msrest.polling.LROPoller` now return `azure.core.polling.LROPoller` and are prefixed with `begin_` (e.g., `delete` -> `begin_delete`).