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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
RyanBentham
Kudo Kingpin
Kudo Kingpin

You don't have permission to view the content of Direct Lake table - Execute Queries API with SP

I'm trying to run "Datasets - Execute Queries In Group"  via a Service Principal for a lakehouse "default" semantic model 

 

The SP has access to the workspace,  necessary permissions in Entra (dataset readwrite & semantic model readwrite) and I have allowed for SPs to access the APIs via the necessary settings in Admin Portal

 

When I submit a request to this endpoint I get:  You don't have permission to view the content of Direct Lake table."

see error below:

{
    "error": {
        "code": "DatasetExecuteQueriesError",
        "pbi.error": {
            "code": "DatasetExecuteQueriesError",
            "parameters": {},
            "details": [
                {
                    "code": "DetailsMessage",
                    "detail": {
                        "type": 1,
                        "value": "You don't have permission to view the content of Direct Lake table."
                    }
                },
                {
                    "code": "AnalysisServicesErrorCode",
                    "detail": {
                        "type": 1,
                        "value": "3242655900"
                    }
......

I'm able to run the query using a standard AAD Token but not a SP 


Please help,  we really need to be able to run queries against our default lakehouse model from a service account


2 REPLIES 2
v-xuxinyi-msft
Community Support
Community Support

Hi @RyanBentham 

 

"The SP has access to the workspace"

 

Can you tell me exactly what role The SP is in the workspace?

 

Please check if the following documents can help you: Direct lake mode and Power BI reporting - Microsoft Fabric | Microsoft Learn

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The SP has admin access (I've tried all).  

I spoke with Microsoft support yesterday.  It's a bug from all accounts that's preventing SPs from querying default Semantic Models via the Execute Queries Endpoint (not sure what other endpoints / services are afffected by the bug)

A workaround they suggested (which I tried and can confirm works) is to :

1)  Create a new semantic model from the same lakehouse
2)  Go to the settings of the newly created model and set the Cloud Connection (within Gateway & Cloud Connections) to "Personal Cloud Connection",  the default seems to be SSO and that won't work when using an SP
3) Within the Refresh section, ensure "Keep your Direct Lake data up to date" is ticked


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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