Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Accessing Description in AzureDevops from PowerBI via oData API?

I am currently using Odata feed in PowerBI power query to access User Stories and their fields from Azure Devops in order to build reporting. I am unable to access the 'description' field using the Odata feed or the analytics views, does anyone know a way that I can pull this?

14 Replies

  • I am also wanting to build a report in Power BI which bring in all Change Request work items with their descriptions. I can build a report in the AzDO Analytics views but I can't pull across the data? Please advise.

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Anonymous 

     

    If the default Analytics views and Odata feed cannot meet your need, you can try create a custom Analytics view and connect to it using Azure DevOps connector. Or use OData queries to connect and query the fields you need.

     

    Reference:

    Use OData queries to generate Power BI reports - Azure DevOps | Microsoft Docs

    Tasks & concepts using Data & Analytics - Azure DevOps | Microsoft Docs

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.

    • caseylide's avatar
      caseylide
      Frequent Visitor

      The response doesn't seem to answer the question or address the issue. Here I will try to address the same problem using my own scenario...

      I am already using odata from Power BI to query work items in Azure Devops. The problem is that the query fails whenever I try to retrieve the "Description" field on work items. I can get other fiels such as Title and WorkItemID to return successfully in the odata query, but not the Description field. Why not? How can this be resolved?

  • Even i am looking out for options to fetch multiline fields like Acceptance criteria , Description... etc.. from Azure Devops to power bi .. Can someone please help me with steps to get the fields using API i am clueless and any small help too will be helpful....

  • Not sure if anyone is still looking for this, but you can get this as follows:

     

    let
    GetDocument = Json.Document(VSTS.Contents("https://dev.azure.com/{your Azure DevOps org}/{your project}/_apis/wit/workitems/{id}")),
    ConvertToTable = Record.ToTable(GetDocument[fields])
    in
    ConvertToTable
     
    Replace {your Azure DevOps org}, {your project} and {id} as applicable.
     
    You end up with something like this:
     

     

    Transposing the table, promoting the first row as headers, and additional transformations will give you the info you need.
    • caseylide's avatar
      caseylide
      Frequent Visitor

      Thanks for your reply! I am indeed still looking for a solution to this thread. I will have a look at your idea, try it out, and let you know how it goes. 

       

      • ferryv's avatar
        ferryv
        Resolver II

        No problem. As this seems to come up a lot, I decided to write an article on LinkedIn about retrieving the Description and Acceptance Criteria with an end-to-end process for a fictional Azure DevOps organisation and project that might help you on your way. The process would be the same for other work item types also (e.g. Risks, Bugs, etc), but the fields might be slightly different.

    • noneother's avatar
      noneother
      Frequent Visitor

      ferryv wondering how to get a table of all the latest workitem data rather than having to specify a single workitem ID?