Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Power BI visualize in Jupyter Notebook

I am trying to use PowerBI in Jupyter Notebook.

I want to create a PowerBI report using the (Financial sample.xlsx) dataframe in Jupyter NB. 

 

The following code is run:

 

from powerbiclient import QuickVisualize, get_dataset_config, Report
from powerbiclient.authentication import DeviceCodeLoginAuthentication

import pandas as pd

df = pd.read_excel("Financial sample.xlsx")

df.head()

 

device_auth = DeviceCodeLoginAuthentication()

## Device Authentication for Integration process was completed successfully

 

PBI_visualize = QuickVisualize(get_dataset_config(df), auth=device_auth)

PBI_visualize

 

.... After this last line is run, I get the following message ... 

Purple_0-1682570251699.png

Not sure what is going wrong!

5 REPLIES 5
Daniel_PBI
Frequent Visitor

Same for me:
Authentication seems to work fine:

from powerbiclient.authentication import DeviceCodeLoginAuthentication
device_auth = DeviceCodeLoginAuthentication()

After running and authentication is done the following appears: 

Device flow authentication successfully completed. You are now logged in . The result should be passed only to trusted code in your notebook.

And after that:

PBI_visualize = QuickVisualize(get_dataset_config(df), auth=device_auth)
PBI_visualize

Results in neither an error nor a response.

Further input is highly appreciated. 👍

ahanfouf
Frequent Visitor

I have the same strange behaviour, that nothing is shown... I tried both authentication methods and restarted the kernel. 

 

Anybody found a solution ? 

ahanfouf_0-1684164377986.png

 

Zeinab
New Member

I use the same code and after this line 

PBI_visualize = QuickVisualize(get_dataset_config(df), auth=device_auth)

PBI_visualize

NO report is showen neither error, it runs with no return.

Anyone faces the same issue ?

Try using Interactive_auth instead.

Zeinab
New Member

Hi,

I think this error related to the authentication part, run the line of authentication separately then follow the steps till the authentication is succeded.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.