Managing licenses and deploying a dashboard into production

Managing license keys is crucial for tracking token consumption per dashboard and primarily for security when publishing them on the Power BI service. In this article, we will detail some strategies for efficient management.

Managing licenses - chatPowerBI
TABLE OF CONTENTS
  1. LICENSE MANAGEMENT OVERVIEW
  2. CREATING LICENSES
  3. EDITING LICENSES
  4. REVOKING LICENSES
  5. PUBLISHING REPORTS ON THE POWER BI SERVICE
1. LICENSE MANAGEMENT OVERVIEW
The license management process is straightforward. Simply access the user panel, navigate to the 'License keys' option in the menu, and go to the 'License management' tab. This tab displays all created licenses. We will first overview general options, then delve into creation, removal, and editing. License management section - chatPowerBI Each license key has an alias, making it easy to identify each one.

Licenses can have three status:
  • active: available for use.
  • disabled: not available for use but can be re-enabled.
  • revoked: licenses that can no longer be used, equivalent to removing a license. For compliance reasons, all licenses once created have their records maintained for auditing purposes, thus their status becomes revoked.

Licenses can also be associated with a specific report ('Report id' column), which is important for security when publishing a report on the Power BI service. We will detail this further in the article.

The table provides various functionalities to facilitate finding the necessary information. The search field finds values in the 'Alias', 'License key', 'Report id', and 'Status' columns. Additionally, each column can be filtered or sorted according to the desired view.

The 'Export' button allows exporting table data to a CSV file if needed for other contexts.
2. CREATING LICENSES
Click the "New license" button, enter an alias for this new license in the dialog box that appears, and click "Save". A success message will appear indicating that the license has been created.

Your new license will appear in the table; to copy it, simply click the copy icon. Create new license - chatPowerBI
3. EDITING LICENSES
Click the pencil icon, and the available editing fields will appear. You can change the license alias (note that aliases cannot be repeated), the report id it is associated with (detailed later in this article), and the status (whether active, disabled, or revoked).

To confirm the edits, click the confirm icon. A success message will appear indicating that the license has been edited. Wait for a minute for the changes to take effect. Edit license - chatPowerBI
4. REVOKING LICENSES
For audit purposes, licenses cannot be removed, but they can be revoked, preventing their future use. To do this, click the pencil icon for editing, choose the 'revoked' status, and click the confirm button. A dialog box will appear asking for confirmation; click 'Yes'.

A success message will appear after the license is revoked. Wait for a minute for the changes to take effect. Revoke license - chatPowerBI
5. PUBLISHING REPORTS ON THE POWER BI SERVICE
Publishing reports on the Power BI service requires special attention. Due to Power BI's design, any visual's properties can be accessed by any viewer of a report (with a bit more knowledge of browser operations, users can find them). Thus, the license key used in the visual is exposed to viewers. Therefore, we need to associate a license key with a report so that even if the license key is discovered, it cannot be used in other reports.

To identify the report id of a report published on the Power BI service, simply access the report in your browser and copy the report id from the URL. Below are some URL patterns and their respective report ids:



If you still have difficulty identifying the report id correctly, you can follow the next steps using a wrong id. We will see that the chatPowerBI visual will tell you the correct report id.

With the report id, in the license management section, edit the license that will be associated with the report, and in the 'Report id' column, enter the value and click the confirm icon. If you haven't found the 'Report id', enter any value at this step. Revoke license - chatPowerBI

Wait for a minute for the changes to take effect. Then you will need to create a new session in the chatPowerBI visual that uses this license.
To do this, click the gear icon and select Clear chat. Creating a new session - chatPowerBI
You can now interact with the assistant. If you used the correct report id, the visual will work normally.

If you used an incorrect report id, the visual will notify you of the correct report id; copy this value and return to the license management section to adjust the value, create a new chat session and then the visual will work normally. Revoke license - chatPowerBINote: reports in Power BI Desktop do not have report ids; see the next paragraph.

An important point: associating a license key with a report can only be done for reports published on the Power BI service. Reports in Power BI Desktop do not have a report id; this is created only when the report is published on the Power BI service.

Because of this characteristic, a best practice is to create a DEV (development) license for each report to be used by developers in Power BI Desktop and a PRD (production) license for use on the Power BI service.

The DEV license will not be associated with any report, and the PRD license will be associated with the report id of the published report.