We use cookies to improve your experience on our website and for marketing. Private Policy.
BASIC CONFIGURATION
This section covers System Configuration parameters related to Power BI Integration Extensions.
After being installed a Power BI Integration Extension needs to be configured.
Configuration section for Power BI Integration could be found by navigating to Stores Configuration menu in Magento 2 or System Configuration in Magento 1.
CONFIGURING EXTENSION LICENSE KEY
Download/Copy License Key
At this stage the License should already be purchased and assigned to a Website using Account pages on https://insightsready.com.
Once the License was assigned to a Website, the License Key got generated and is available for download. License Key can be downloaded on the Website's Details page. To open the Website Details, navigate to "My Websites" menu (on the Account page on https://insightsready.com) and click on "Details" link in the list of Websites.
License Key can be obtained on the Website Details page:
Online License Key is a short version of the key. Website https://insightsready.com will be used to obtain the complete License Key by the Extension. If this communication between Magento Platform and https://insightsready.com is not desired, Offline License Key might be used. Offline License Key can be downloaded on Website Details page and uploaded to Magento Platform.
If the License comes with documentation files or any other files to download, they will be available on "Downloads" page. Extension code can be obtained using composer repository. Access data to the repository will also be available on the Website's Details page.
Configure License Key
Once the License Key is obtained, it can be entered in Magneto Configuration. The configuration can be opened by navigating to Stores Configuration in Magento 2 (System Configuration in Magento 1). On the Configuration page navigate to Insights Ready General
POWER BI APP REGISTRATION
Power BI Extension is integrated with Azure Active Directory (Azure AD) to provide secure sign in and authorization between Magento Platform and Power BI API. The following is needed in order to start using Power BI Integration Extension: Azure Active Directory tenant, an organizational user, and a Power BI service account. The extension uses a Client ID to identify itself to Azure AD. Also, a Client Secret Key needs to be created.
Microsoft has developed a tool to simplify the process of Power BI App registration: https://dev.powerbi.com/apps. Please, enter the following options during the usage of the tool:
-
Use "Server-side web application (for web apps or web APIs)" as Application Type.
-
Enter domain of your store as Home Page URL.
-
Use the URL of your Magento Admin path supplied with "bim_pbi/callback/" suffix as Redirect URL
Example:
https://magento2.shop.net/backend/bim_pbi/callback/
-
Select all permissions.
If the tool does not work, you may look in the Power BI documentation from Microsoft for the information on how to configure the Power BI App and obtain a Client ID and a Client Secret Key:
Set up Power BI Embedded The obtained Client ID and Client Secret Key needs to be configured for the Power BI Integration Extension on Magento Configuration page (Stores Configuration in Magento 2, System Configuration in Magento 1), section Insights Ready; Power BI Integration; Power BI API:
Setting up Power BI API might take some time, especially if an organization were not using Active Directory before. Usually people face some problems due to incorrectly configured Redirect URI. Please, use the following value as Redirect URI:
https://your.domain.net/backend/bim_pbi/callback/
To update the callback URL for Magento 1, you will need to use the "pbi_callback" endpoint. This can be done by appending "/pbi_callback/" to the end of your Magento Admin path. For example, if your Magento Admin path is https://magento1.shop.net/admin your callback URL should be
https://magento1.shop.net/admin/bim_pbi/callback/
It is important to note that the callback URL must be accessible over HTTPS and should match the Redirect URI that you specified during the Power BI app registration process. Once you have updated the callback URL, be sure to save your changes and test the integration to ensure that it is working as expected.
For the rest of information, please, refer to the Microsoft documentation as main source of the information.
As an additional support, for a quick reference, we list the steps you may need to perform in order to obtain a Client ID and a client secret key for Power BI API.
Step 1: Create an Azure account
You should be able to create an Azure account for free. You pay only for Services you are using or for an optional support subscription.
Here is the URL where you may start with registration of an account:
https://azure.microsoft.com/en-in/free/
Step 2: Create an Azure Active Directory tenant
Please, follow the instructions from Power BI documentation in order to create an Azure AD tenant:
Power BI - Create an Azure Active Directory Tenant
Please, note that you do not need to activate Power BI Pro account as it is stated in Microsoft documentation since you do not have to use Power BI embedded in order to setup the API.
Step 3: Create some users in your Azure Active Directory tenant
You may want to create some users if you did not do that before. Each user who will use Power BI Service or Power BI Mobile App may need to have separate Power BI user.
And if you want to share content and use Power BI Workspaces, you may add Power BI Pro licenses. Pro license is needed for the user who will create the Power BI Workspaces and populate it with content and for the users who will get access to the Workspaces.
Step 4: Register Power BI Application
You may use new Power BI App Registration Tool for that or using Azure portal.
Follow instructions related to Server-side Web app or Web Applications instead of registering a Native app.
Use Redirect URL as your domain name (of the backend system) with an extra suffix at the end.
Redirect URI: https://your.domain.net/backend/bim_pbi/callback/
Note: You cannot use HTTP protocol with Power BI
Integration. As an exception, you can use website deployed on
http://localhost/
domain.
In result, the application should be available in the list of applications in Azure AD:
Step 5: Get Client ID and Client Secret
Please, refer to the "How to Get the Client ID" section of the documentation to get the Client ID:
https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-register-app/
To get the client secret key, you may need just few additional steps to be performed on the Azure portal: after you have selected the application, click on Keys menu under API ACCESS section and add new key there.
Client ID inside Azure AD:
Client Secret inside Azure AD:
SCHEDULED UPDATES
Power BI Integration Extension comes with a scheduler that allows performing periodically automated data actualization. To configure the schedule, navigate to Magento Configuration page using menu Stores Configuration in Magento 2 (System Configuration in Magento 1).
On the Magento Configuration page navigate to Insights Ready Data Integration (ETL); Scheduler.
This section allows users to configure:
-
Regular schedule for jobs that needs to be performed once per day or less often.
-
Live schedule for jobs that need to be executed several times per day.
-
Clean Up schedule for executing data clean up jobs from time to time.
Below you will find details about each of the options.
-
Enable Regular Load option allows enabling/disabling execution of the jobs by regular schedule.
-
Regular Load Start Time is the time of the day when to execute regular jobs. Usually users may want to set this time to a period with lowest activity, at night.
-
Regular Load Frequency allows setting the frequency for regular jobs: daily, weekly, monthly.
-
Enable Live Load option allows enabling/disabling execution of the jobs by life schedule.
-
Live Load Frequency allows setting the frequency for live schedule: from once per minute to once in 2 hours.
-
Enable Clean Up option allows enabling/disabling execution of the clean-up jobs.
-
Clean Up Frequency allows setting the frequency for clean-up jobs: weekly, monthly or once in two months.
SECURITY CONSIDERATIONS
API Permissions Required
Depending on the functionality used, you may need to add the permissions to your registered App in Azure listed below.
- Core Power BI Integration functionality
- Core PBI Integration + Embedded Content
- Core PBI Integration + Embedded Content + Reports Management from Magento
- All permissions + Automated Embedding Management
Whitelisting Power BI API IPs
When integrating Power BI into your application or service, it's important to ensure that only authorized IPs can access your Power BI content. To do this, you need to whitelist the IP addresses that the Power BI APIs use.
To ensure secure access to your Power BI content, it's recommended to whitelist the IP addresses of the Power BI APIs that your application or service will be using. By doing so, you can restrict access to your Power BI resources to only those requests coming from approved IP addresses.
Microsoft publishes IP ranges for each cloud region and service tag in JSON format, which is updated weekly. You can download these IP ranges from the following links:
-
Public: https://www.microsoft.com/en-us/download/details.aspx?id=56519
-
US Gov: http://www.microsoft.com/en-us/download/details.aspx?id=57063
-
Germany: http://www.microsoft.com/en-us/download/details.aspx?id=57064
-
China: http://www.microsoft.com/en-us/download/details.aspx?id=57062
These JSON files are broken down by region and by the tagged services in that cloud. They include versioning both for the full file and each individual service tag in that file.
To whitelist the IP addresses for your Power BI API, follow these steps:
- Download the appropriate JSON file for your cloud and region from the Microsoft Download Center.
- Extract the file and locate the IP address ranges for the Power BI service tag(s) you want to whitelist.
- Add these IP address ranges to your network security group or firewall configuration to allow access to the Power BI APIs.
It's important to note that these IP ranges can change frequently and unexpectedly, so it's recommended to regularly check for updates and adjust your whitelisting rules accordingly.
By whitelisting the Power BI API IPs, you can ensure secure access to your Power BI content and protect against unauthorized access.