Azure Resource Manager API

The release of the new Azure capacities for Power BI Embedded in October enables ISVs to enjoy the full elasticity of an Azure resource. ISVs can now pause or resume capacity, scale up or down and pay for hourly usage only. To fully leverage this capability, those actions need to occur programmatically.

So now, as promised, we are releasing Azure Resource Management APIs to do all these actions automatically. These are all the actions you can perform using the ARM API:

Cloud Service Provider purchase channel now available

CSP subscription type can now purchase Power BI Embedded. The CSP offering joins all the rest of subscription types that are already supported for purchasing Power BI Embedded capacity.

Visual Options menu and Context menu extension

Power BI visuals have two menus: Context menu and Options menu. Options menu is opened by clicking the ellipsis icon on the top corner of the visual. Context menu is opened by right click on the data. Both menus can now be extended to add customized actions specific to your app and users.

In the example below, you can see warehouse robot assets table, that shows data on health and maintenance of the robots. Clicking on the ellipsis icon on the top-right corner will open the Options menu.

Notice that the bottom item is a customized extension to open a service ticket.

If we right -click on any data point in the table, the Context menu will open.

On the Context menu, where you can get the data point on which the user clicked, you can see another item- “Analyze Asset”.

If the user clicks on “Open service ticket” from the context menu, the following action will be initiated-

Notice that the warehouse app used the data point on which the user clicked to ease the ticket process.

This is a good example of how application developers can shorten the time-to-action by adding relevant capabilities where insights are discovered. Learn more on menu extensions.

To extend the menus, define and pass the object in the extension object under Embed Configuration, when loading the embedded content. You can add or update the menu extensions during a user’s session using the updateSettings method.

Once the user clicked on the extension item, a commandTriggered event is invoked. Implement event handler using this JS code:

report.on(“commandTriggered”, function(command) {

// Handler code

});

Preload API for a better loading experience

The Power BI JavaScript SDK now offers developers the ability to preload our embedded endpoint, which will provide better and faster experience when displaying Power BI Embedded Reports & Dashboards.

We offer the new powerbi.preload() function, which loads all related Power BI scripts and styles in the background, to later be consumed via browser cache.

The new API requires only the desired embedUrl and embedded entity type (report, dashboard, tile) to start the preloading process.

This experience is best suited for applications that do not require Power BI Embedded on their initial pages and can utilize background preprocessing of Power BI's scripts and styles, which will only be used in later times by the application's end user.

To use the new preloading API, one would need to acquire the embedUrl of the artifact he wants to later embed, specific reportId or dashboardId are not required. Once the embedUrl is retrieved, use the following code:

var config = {

type: 'report',

embedUrl: embedUrl

};

powerbi.preload(config);

Security group sharing- automatic refresh of user’s permission

When you choose to embed Power BI for your organization's internal users (users have a Power BI account and granted permissions for the underlying artifacts) they will no longer need to sign into Power BI to refresh their permissions. This limitation was mostly around sharing content with security group where end users didn't log into PowerBI.com after they were added to the security group. With the new experience available for reports (soon to become available for dashboards), Power BI embedded diagnoses this state and as part of the session automatically refreshes end user permissions and retry resource reloading, resulting in a smooth experience for the end user.

Update connection string

The current Power BI SetAllConnections API enables developers to change the dataset connection so they can duplicate reports and dashboards for new customers and connect each copy to the customer’s data source. However, until now the API only supported DirectQuery connections.

Now we offer a new Update Connection API that extends this capability to more connections. This API supports SQL and AS connections, for all types- Cloud, on-premise, direct, live connection, cached.

To support the new API, we extended the info returned for each data source in the Get Datasources API. Each datasource object now has data on the datasource type and connection details- server and database names.

With this new API, we help developers fully automate their onboarding of new customers, by cloning workspaces and their content. See this blog post for complete example of how to clone workspaces.

(note- this example does not contain the new Update Connection API)

RLS support on AS Azure for pre-defined roles

For ISVs working with AS Azure, we added support for specifying roles on the embed token generation to apply custom filter on the data. After Defining your user’s roles in AS, you can pass the relevant role you wish to filter the data with. Applying RLS will give each user a view of the relevant data for his role.

Note that when specifying roles on embed token generation, the master user UPN must be provided as effective user name, and the master user must be member of all the relevant roles in AS Azure.

What’s still puzzling

Starting now, nothing should be! We gathered some of the most common problems developers and ISVs have been facing and asking about in the community in 2 documents-

This is the first draft and we will constantly add more answers, so be sure to first check out this docs before turning to support channels with any problems.

Q: Can I use only a Pro license without a dedicated capacity to work with Power BI Embedded in Production? I’m trying it on my application and I can see it is working.

No. Using a single Pro license without a dedicated capacity for multiple customers in production is a violation of the license. To move to production, make sure your embedded content resides in dedicated capacity- a Power BI Premium or Power BI Embedded capacity. You can use a single Pro license without a dedicated capacity when you develop your application.

Production environments require more embed tokens than the number included with a Pro capacity, as such, these embed tokens are intended for development only. When used in production environments, users will see errors when the number of tokens exceed the number of embedded requests.

Custom Visuals

As part of our ongoing commitment to empower the community to create and to use custom visuals, we are excited to share that custom visuals developers can now get listed as partners and offer their services on AppSource to potential customers, to promote their business.

Custom visuals developers can offer tailor-made visual development, custom visuals development training, or other consulting services regarding custom visuals, through AppSource’s consulting services. Listing on AppSource helps developers reach many potential customers who are looking for a vendor to develop custom visuals for their unique needs.

Read the full announcement and how to apply in the community site blog here.

API

API 1.9 is now available, adding the ability to open the default browser and navigate to a URL.

LaunchUrl API comes in handy when you need to refer the user to a website or an external resource, such as documentation or support. The API receives a URL and then launches it in the device’s default browser, after getting consent from the user. Use the LaunchUrl API with buttons and links to enrich the user’s experience.

Here is an example of an enriched chiclet slicer, with URLs enabled. Titles which have URLs present in the data, will be shown as blue clickable links. The user can see the URL on hover before clicking it, and will get a consent popup upon clicking, to prevent unwanted navigation. The URL will open in a new browser window.

Security matters

Make sure you read the security developer guideline, so you take security and privacy issues into consideration while developing your custom visuals, which will also get you closer to certifying the visuals, as Microsoft is following the same guidelines as part of its certification process.

The security guidelines cover areas such as data leakage, XSS attacks, privacy, and more, as well as recommended good practices like lint. Highly recommended.

As always, feel free to use all the communication channels at your disposal to connect with our team, share your thoughts and ask questions:

Sign up for the Power BI Newsletter

Sign up below to get the latest from Power BI, direct to your inbox!

By clicking Sign up today, you are giving your consent to Microsoft for the Power BI newsletter program to provide you the exclusive news, surveys, tips and advice and other information for getting the most out of Power BI. You can unsubscribe at any time. Microsoft Privacy Statement.

What is Power BI?

Power BI is a suite of business analytics tools to analyze data and share insights. Monitor your business and get answers quickly with rich dashboards available on every device.