microsoft / powerbi-jupyter

A Custom Jupyter Widget Library for Power BI
MIT License
469 stars 150 forks source link

Authenticacion with msal.ConfidentialClientApplication() #53

Closed CrasCris closed 5 months ago

CrasCris commented 6 months ago

Why if i get the access_token using microsoft graph application it fail to load the report ?, is it possible to authentication only for and app and not using human interaction ?

v-MadhavC commented 5 months ago

It looks like you tried using a Graph access token, but you actually need a Power BI access token. We provide two ways to get the correct access token. Refer the following documentation for more details: Home · microsoft/powerbi-jupyter Wiki (github.com).

If you prefer, you can also create your own logic to get a Power BI AAD token and provide that token when creating the Report object. For more information, refer - Permission tokens needed to embed a Power BI app - Power BI | Microsoft Learn. But please keep in mind that we use the "embed for your organization" scenario in this library.

CrasCris commented 5 months ago

I use the same logic powerbi rest api docs

v-MadhavC commented 5 months ago

Could you please provide the specific documentation or resource you are referring to regarding the Power BI embed token scenario? Also, here are some relevant documentations that you can follow - Generate an embed token in Power BI embedded analytics - Power BI | Microsoft Learn, Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn

If you tried to use the embed token scenario (App owns data/embed for your customers), it's important to note that this is not supported for the powerbi-jupyter.

CrasCris commented 5 months ago

Yep, i mean just to another form to authentication, like the api rest