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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
mwroblewski
Frequent Visitor

error when direct query to the dataset - unauthorized 401

Hi,

 

I'm connecting to existing powerbi dataset (live connect) and want to switch to direct query in order to merge it with local excel file. The preview feature "DirectQuery for PBI datasets" is turned on. When I'm adding new datasource, I have a pop up about adding a local model, once i click "add local model", I get an error:

mwroblewski_0-1677968042749.png

Hoping for any advice!

 

2 REPLIES 2
mwroblewski
Frequent Visitor

All tenant settings are set accordingly:

- Allow XMLA Endpoints and Analyze in Excel with on-premises datasets.

- Users can work with Power BI datasets in Excel using a live connection.

- Allow DirectQuery connection to Power BI datasets

- XMLA endpoint is set to "Read/Write".

 

To avoid any limitations, I even tried on super simple dataset, just excel file published as dataset. Trying to connect it with driect query gives still error. This time :

Error Message:
The remote server returned an error: (403) Forbidden.

mwroblewski_0-1678183401745.png

 

v-yanjiang-msft
Community Support
Community Support

Hi @mwroblewski ,

 

In which step the error occured, change the connection mode to direct query or connect to another data source?

To be able to make a DirectQuery connection to a Power BI dataset, your tenant needs to have "Allow XMLA Endpoints and Analyze in Excel with on-premises datasets" and "Users can work with Power BI datasets in Excel using a live connection" enabled.

If they are all enabled, please check if you meet these limitations.

 

Best Regards,
Community Support Team _ kalyj

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors