Forum Discussion

GiselaV's avatar
GiselaV
New Member
5 days ago
Solved

Error when refreshing a single query in Service -- DataSource.Error: ODBC: ERROR [42000]

Hi Devs, 

I'm having this error when trying to refresh a single query in pbi service (semantic model):

DataSource.Error: ODBC: ERROR [42000] [Microsoft][BigQuery] (100) Error interacting with REST API: Access Denied

It's odd because it mentions a project that this report doesn't use and I have never heard of it (so my guess is that the message is random and the problem is really something else). IMPORTANT: everything works just fine in desktop.

So far I've tried:

* Re-configure data source credentials in service.
* Remove data source credentials in service, and republishing.
* Change authentication method.

Has anyone seen this before? Anything is helpful at this point.

Thanks!

  • Hi GiselaV​,

    Based on the error message, I suspect the issue is related to the Google BigQuery Billing Project ID, rather than the credentials themselves.

    The important point is that the BigQuery project used to execute and bill queries can be different from the project where your actual tables are stored.

    If you don't explicitly specify a Billing Project ID, the Power BI BigQuery connector can automatically select the first available project returned by Google. This could explain why the error mentions a project you don't recognise.

    Hope this helps!
    Best Regards,
    Maruthi
    LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/
    X            -  Maruthi Siva Prasad - (@MaruthiSP) / X

8 Replies

  • v-achippa's avatar
    v-achippa
    Icon for Community Support rankCommunity Support

    Hi GiselaV​,

    Thank you for reaching out to Microsoft Fabric Community.

    Thank you viraj_arsekar​, maruthisp​ and ShafiUllah-bc​ for the prompt response.

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

    Thanks and regards,
    Anjan Kumar Chippa

    • GiselaV's avatar
      GiselaV
      New Member

      Anjan, 

      Sorry about the delay, monday and tuesday were national holidays in my country. Just solved the issue using one of the comments and marked as solved.

      Thanks everyone! ❤️

  • Not sure if you tried this, but sometimes something small can cause issues.

    I would first check all the data sources in the pbix. File --> Options and settings --> Data source settings (Data sources in current file). See if this data source you're seeing in the error is present here. 

    Even if you are not using any data from it, the data source may have been added previously to the file and not removed or is in the data model somewhere. Although you mentioned it's fine in services.

    Also check the Gateway connections in the services and verify what all sources it shows there. If it's working in desktop and not in service, it could mean you have access to whatever project it's trying to connect to (Google cloud query I believe?), but the credentials in the Gateway connection may not have access to it. First thing is to find what that project is and where in your semantic model it is. 

    • GiselaV's avatar
      GiselaV
      New Member

      Hi Viraj, 

      That project is not being used anywhere in the report, and it hasn't been (the report is created by me from scratch and maintained too). So the project in the error really has nothing to do with the content of the report whatsoever, that's why I think it's random.

      Thanks!

  • Hi GiselaV​,

    Based on the error message, I suspect the issue is related to the Google BigQuery Billing Project ID, rather than the credentials themselves.

    The important point is that the BigQuery project used to execute and bill queries can be different from the project where your actual tables are stored.

    If you don't explicitly specify a Billing Project ID, the Power BI BigQuery connector can automatically select the first available project returned by Google. This could explain why the error mentions a project you don't recognise.

    Hope this helps!
    Best Regards,
    Maruthi
    LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/
    X            -  Maruthi Siva Prasad - (@MaruthiSP) / X

    • GiselaV's avatar
      GiselaV
      New Member

      Hi Maruthi!

      Thanks!! You nailed it.
      In fact, the project (where the data comes from) and the billing project are not the same.

      I used to have this:


      And now I did this:

      And the data loaded just fine.

      Thanks a lot! 😊

      Gise.

  • Hi GiselaV​,

     

    To make the billing-project check actionable, inspect the affected query's Source step. Microsoft documents this Access Denied scenario and recommends explicitly setting BillingProject in the M connection, including for service refresh through a gateway.

     

    Replace your-project-id with the intended billing project:

     

    let
        Source = GoogleBigQuery.Database([BillingProject = "your-project-id"])
    in
        Source

    This is only the connection step. Keep your existing navigation and transformation steps, and preserve any other connection options already in use.

     

    The identity used by the service connection needs bigquery.jobs.create on that billing project, as well as access to the source data. Check the full refresh error for the denied permission before requesting access changes. An unfamiliar project name is worth investigating, not treating as a random message.

     

    Microsoft reference

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Icon for Community Champion rankCommunity Champion

    Hi GiselaV​,

    The error message points quite specifically to the BigQuery project being used to create the query job rather than necessarily to the credentials for the source tables themselves.

    BigQuery requires the identity running the refresh to have bigquery.jobs.create on the project from which the query job is executed. That project can be different from the project that actually contains the tables.

    Microsoft documents this exact Power BI connector error and recommends explicitly setting the Billing Project ID rather than allowing the connector to select the first available project automatically.

    For example, the connection can be defined as:

    Source = GoogleBigQuery.Database([BillingProject="your-billing-project-id"])

    If the refresh is occurring through the Power BI Service or a gateway, I would also verify that the identity used by that service connection has bigquery.jobs.create on that billing project, while still retaining the required permissions such as bigquery.tables.getData on the actual source tables.

    That distinction may also explain why the same report/query works in Desktop but fails in Service: the two refresh contexts may be authenticating differently or using a different project as the query/billing project.

    I would therefore check the project ID named directly in the error first, then confirm which BillingProject Power BI is actually using before recreating the model or changing unrelated transformations.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.