Is it possible to embed power bi into desktop application?

前端 未结 1 1458
执笔经年
执笔经年 2021-01-06 09:09

I\'m an ISV developing a desktop application and would like to consider using power bi embedded for my application, but just can\'t seem to find information if it is possibl

相关标签:
1条回答
  • 2021-01-06 09:54

    EDIT: PowerBI Workspace Collections are now retired so this method no longer works.

    Finally I've managed to do that.

    Here are the main steps (in case if anyone else needs to embed Power bi report into WinForms solution):

    1) you need Azure subscription that has an organizational account that has assigned power bi subscription (free version is enough) - if you don't have this, you can not assign power bi service access rights

    2) in azure subscription you have to create PowerBI workspace collection (here you can get access keys and workspace collection id that will be necessary to access your power bi report)

    3) design your report in Power BI desktop (if it's against Azure SQL db, then you can use Direct mode even with power bi free subscription)

    4) to upload your report into azure power bi workspace collection you can use ProvisionSample project from this git hub repository

    • have to register this app in your AAD and add it power bi service related permissions
    • you have to create workspace (after that you can get it's id in Azure portal)
    • then upload pbix file in to workspace
    • if you use Azure SQL, then you have to update connection string (also possible using this solution)
    • in the EmpedSample project of this solution, you can see how it's working in case if it's embedded in Web solution
    • here is a link to power bi idea that requests easing this process (just in case if anyone's interested in this, too...)

    5) now, to get this into winforms solution, you can use this WinformsSample project (it's not merged into master at the moment, don't know how to easily download it, but tested it and it works!)

    • interesting that this app does not require registering in azure - seems like workspace collection key + related data is sufficient...

    P.S. This 5th point somehow makes me a bit nervous (i.e. storing app keys in the client side code) perhaps it would be possible to move app keys to REST API side and retrieve it using REST service call - then, I guess it would be more secure... + changing app keys (there is a re-generation tool in Azure portal - see workspace collection entry) would not involve changes to client application

    0 讨论(0)
提交回复
热议问题