Skip to main content

No project description provided

Project description

README for Shipyard Microsoft Power BI CLI Tool

Introduction

This CLI tool is designed to interact with the Microsoft Power BI REST API, providing a convenient command-line interface for automating tasks related to Power BI. It's part of the Shipyard integration suite and is intended for users who need to programmatically manage Power BI resources.

Requirements

  • Python 3.x
  • Access to Microsoft Power BI REST API with valid credentials.

Installation

To install this tool, ensure Python 3.x is already installed and then use pip to install the shipyard-microsoft-power-bi package:

pip install shipyard-microsoft-power-bi

Usage

The tool is run from the command line and requires several arguments to authenticate and specify the actions to be performed.

Authentication

The tool requires a service principal to authenticate with the Power BI REST API. The service principal must be created in Azure Active Directory and have read/write permissions to the tenant's Power BI resources. The service principal must also be added to the Power BI workspace as a member.

The following environment variables must be set to authenticate with the Power BI REST API:

  • MICROSOFT_POWER_BI_CLIENT_ID: The client ID of the service principal.
  • MICROSOFT_POWER_BI_CLIENT_SECRET: The client secret of the service principal.

Service Principal Creation

Microsoft documentation.

Step 1: Go to the Azure portal and search for App Registration

Step 2: Click on New Registration

Step 3: Fill in the Form

  • App Name: Shipyard Power BI (or whatever you want to call it)
  • Supported Account Types: Accounts in this organizational directory only
  • Redirect URI: Leave blank

Step 4: Click Register

Step 5: Copy the Application (client) ID and Directory (tenant) ID and save them somewhere.

Step 6: Click on Certificates & Secrets

Step 7: Click on New Client Secret

Step 8: Fill in the Form

  • Description: Shipyard Power BI (or whatever you want to call it)
  • Expires: 6 months(Recommended)

Step 9: Click Add

Step 10: Copy the Value of the Client Secret and save it somewhere.

Step 11: Click on API Permissions

Step 12: Click on Add a Permission

Step 13: Click on Microsoft APIs

Step 14: Click on Power BI Service

Step 15: Click on Read/Write Tenant Permissions

Step 16: Click on Add Permissions

Step 17: Click on Grant Admin Consent for

Step 18: Click on Yes

Inviting Service Principal to Power BI Workspace

Microsoft documentation

Step 1: Go to the Power BI Workspace

Step 2: Click on Access

Step 3: Click on Add

Step 4: Click on Add members

Step 5: Paste the Application (client) ID from the service principal creation step

Step 6: Click on Add

Step 7: Click on Select a role

Step 8: Click on Member

Step 9: Click on Apply

Step 10: Click on Add

Step 11: Click on Done

Enable the Power BI service admin settings

Microsoft documentation

Step 1: Go to the Power BI Workspace

Step 2: Click on Settings

Step 3: Click on Admin portal

Step 4: Click on Tenant settings

Step 5: Click on Developer settings

Step 6: Click on Allow service principals to use Power BI APIs

Step 7: Click on Apply

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shipyard_microsoft_power_bi-0.1.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shipyard_microsoft_power_bi-0.1.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file shipyard_microsoft_power_bi-0.1.1.tar.gz.

File metadata

  • Download URL: shipyard_microsoft_power_bi-0.1.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.9.16 Darwin/22.5.0

File hashes

Hashes for shipyard_microsoft_power_bi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1adbf4182bbe5013bfd8c524d5fbc88db0ea6402c181bfc910526d198f7e3eb1
MD5 16e00fd45a8776c75a8fb41d802d628d
BLAKE2b-256 90ed8935420e739ddbf6e117734be55dcc1080886019c0a3d43a42997b6b845e

See more details on using hashes here.

File details

Details for the file shipyard_microsoft_power_bi-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for shipyard_microsoft_power_bi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6fca6e40452268af57f30c22eac7c7823a8bca4612adb9e22f21b34cb40af925
MD5 00f3ae349407ad351c41884c43a49fc2
BLAKE2b-256 e728f1ea82a8a243e0021dde6534aaac25a060f8a52d3e2a9f100a1e0622d7c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page