Forum Discussion

syl-ade's avatar
syl-ade
Icon for Helper II rankHelper II
8 months ago
Solved

Power BI + Azure DevOps OData — how to avoid 403 “Access to the resource is forbidden” when new proj

Hi everyone,

I’m pulling data from Azure DevOps into Power BI via the Analytics OData API. The goal is to have data across “all projects”. This works initially, but whenever a new project is created in Azure DevOps that I don’t have permission to read, refresh fails with:

Expression.Error: Access to the resource is forbidden.

Question: Is there a way to design the queries so Power BI only retrieves data from the projects I do have access to, instead of failing because some projects are inaccessible?

  • Hi syl-ade,

     

    Based on the issue here there is no way for Analytics OData to automatically skip projects you do not have access to. When you use the organisation-level Analytics OData endpoint, azure devops first enumerates all projects and even if one project returns a 403, the entire feed fails at that point.

    • Because of that, the only possible options are granting the power bi identity read access to all projects or using project scoped analytics endpoints. This is a limitation of the Azure DevOps Analytics service, not power bi.

    Thanks and regards,

    Anjan Kumar Chippa

7 Replies

  • Hi syl-ade 

     

    There is no built-in “skip inaccessible projects” option in the OData feed. The best approach is to scope your queries only to projects you can access. Here are two practical strategies:
     

    Option 1: Use project-scoped endpoints

    Instead of querying the organisation-level endpoint, use project-specific endpoints:
    https://analytics.dev.azure.com/{org}/{project}/_odata/v3.0-preview/WorkItems
    • Create separate queries for each project you have access to.
    • Combine them in Power Query using Append Queries.
    • This ensures that if a new project is created without your permissions, your refresh still succeeds.

     

    Option 2: Parameterise the project list

    • Maintain a list of projects you have access to in a parameter table.
    • Use Power Query to dynamically build queries for only those projects.
    • Example approach:
      • Create a parameter table in Power BI with project names.
      • Use List.Generate or Table.AddColumn to iterate through the list and call the project-specific OData endpoint.
      • Append results into a single table.

     

    If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.

    Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.

    • syl-ade's avatar
      syl-ade
      Icon for Helper II rankHelper II
      Hi Zanqueta ,
      Thank you for your reply. I specifically wanted to avoid using predefined project lists, as this would be another item to maintain.
    • syl-ade's avatar
      syl-ade
      Icon for Helper II rankHelper II

      Hi lbendlin ,
      How do you think I could use it in this case?
      Whenever there is a new project, I lose access to all data in Azure DevOps. How this would handle 403 error?

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

        Hi syl-ade,

         

        Based on the issue here there is no way for Analytics OData to automatically skip projects you do not have access to. When you use the organisation-level Analytics OData endpoint, azure devops first enumerates all projects and even if one project returns a 403, the entire feed fails at that point.

        • Because of that, the only possible options are granting the power bi identity read access to all projects or using project scoped analytics endpoints. This is a limitation of the Azure DevOps Analytics service, not power bi.

        Thanks and regards,

        Anjan Kumar Chippa

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

    Hi syl-ade,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Thank you Zanqueta and lbendlin 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