Connect Analytics with Power BI Data Connector
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
In this article, learn how to establish a seamless connection between Power BI and Azure DevOps by using Data Connector. This integration allows you to extract valuable insights from your Azure DevOps data and create compelling reports within Power BI. Power BI Data Connector uses Analytics views.
Important
Analytics views only support Azure Boards data (work items). Analytics views don't support other data types, such as pipelines. Views provide a flat-list of work items and don't support work item hierarchies. At this point, we have no plans to update the connector to support other types of data. For information on other approaches, see About Power BI integration.
Prerequisites
- Get familiar with What is Analytics and the knowledge base of Power BI articles.
- Install the Power BI Desktop October 2018 Update or a newer version.
- Ensure that you're a project member. If you aren't, get added now. Anyone with access to the project, except stakeholders, can view Analytics views.
- Ensure that Boards is enabled. If not, Analytics views doesn't appear. To reenable Boards, see Turn an Azure DevOps service on or off.
- Ensure that you have permissions required to access Analytics. If you're a member of the project Contributors group, you have permission.
- Create an Analytics view that you want to create a Power BI report.
- Get familiar with What is Analytics and the knowledge base of Power BI articles.
- Install the Power BI Desktop October 2018 Update or a newer version.
- Ensure that you're a member of a project with Basic access or higher. If you don't have a project yet, create one.
- Ensure that you're a project member. If you aren't, get added now. Anyone with access to the project, except stakeholders, can view Analytics views.
- Verify that Analytics is installed, and if not, then enable it. You must be an account owner or a member of the Project Collection Administrators group to add extensions or enable the service.
- Ensure that Boards is enabled. If not, Analytics views doesn't appear. To reenable Boards, see Turn an Azure DevOps service on or off.
- Ensure that you have permissions required to access Analytics. If you're a member of the project Contributors group, you have permission.
- Create an Analytics view for which you want to create a Power BI report.
Important
Azure DevOps doesn't support Alternate Credentials authentication. If you're still using Alternate Credentials, we strongly encourage you to switch to a more secure authentication method.
Connect to an Analytics view
Open Power BI Desktop.
Sign in to the service. First-time access requires you to sign in and have your credentials authenticated. Power BI Desktop saves your credentials so you only have to do so once.
Note
Azure DevOps doesn't support cross-tenant scenarios using OAuth. Instead, use service principals and managed identities.
Select Connect upon verification of your credentials.
Select Get Data > Online Services, then select Azure DevOps (Boards only) for cloud services or select Azure DevOps Server (Boards only) for on-premises. Select Connect. Analytics views only support queries against work items and test cases.
Specify the basic parameters to connect to your data.
- Collection URL: Enter the URL where your Azure DevOps Server instance is hosted. An example URL is
http://fabrikam-server/AzureDevOpsServer/fabrikam-collection
. - Team project: Enter only the project name. For example, use Fabrikam-Fiber if the URL of your Azure DevOps Server instance is
http://fabrikam-server/AzureDevOpsServer/fabrikam-collection/Fabrikam-Fiber
.
Important
Don't confuse the team name with the project name, which is a common mistake. For example, if the URL that you use is
http://fabrikam-server/AzureDevOpsServer/fabrikam-collection/Fabrikam-Fiber-Git/Device
, then Fabrikam-Fiber-Git is the project name and Device is the team name.After successful sign-in, Power BI verifies that your user credentials have permissions to access the specified project. If any errors arise, see the FAQs for solutions to the most common problems.
- Collection URL: Enter the URL where your Azure DevOps Server instance is hosted. An example URL is
Select the Analytics view
Expand the Shared Views folder, select an Analytics view, and then select Load. The Data Connector presents a list of available Analytics views. Each view represents a set of data that you can pull into Power BI. You can also create custom Analytics views.
The following image shows the default Analytics views. Your list of views might differ based on the process model used to create your project. All views listed, except the views appended with "Today," provide historical trend data.
In the following example, we select Stories - Last 30 days, which filters for product backlog items.
Note
Because you verified the view in the previous section, the view should load. If the view doesn't load, it's most likely because the dataset is too large. Return to the view under the Analytics view in the web portal and adjust the filters to decrease the size of the dataset.
Select the view.
Note
The preview shown for any selected views in the navigator can be truncated depending on the number of fields selected and the size of the dataset. The data is truncated only for the preview and won't affect the full data refresh.
- Select the Work Items - Today table and wait for the preview to load. It represents the current state of all work items in the project.
- Select the checkbox next to the Work Items - Today table and select Load.
Note
Analytics views don't apply filters defined by using Power BI on the server. Any filters applied in Power BI limit the data shown to end users but don't reduce the amount of data retrieved from Analytics. If the filter is intended to reduce the size of the dataset, apply it by customizing the view.
Wait for the data to load. You can observe its progress by looking at the status messages, which appear directly under the table name. If you see any errors, see the FAQs section for solutions to the most common problems.
Review the Data model. While the model loads, review the dataset design for the Power BI Data Connector.
Create a report
Create a report based on the loaded data. After the load operation finishes, you can explore the data by creating custom reports. For examples of common reports, see Data Connector - Example reports.
FAQs
Find answers to common questions about Power BI Data Connector and Analytics error messages.
Q: How should I read error messages coming from the connector?
A: You might feel challenged reading error messages coming from the connector because they typically contain extra contextual information. If the load operation fails, then the message starts with "Failed to save modifications to the server...". When you see it, search for [DataSource.Error] Azure DevOps...:. The following example shows the error message returned from the connector. The most important part of the error message is "Query result exceeds maximum size. Reduce the number of records by applying additional filters."
Q: How do I resolve the "Query result exceeds maximum size. Reduce the number of records by applying additional filters" error?
A: You get the following error if the number of records retrieved from Analytics exceeds 250,000:
"Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: [DataSource.Error] VSTS: Request failed: The remote server returned an error: (400) Bad Request. (Query result exceeds maximum size. Reduce the number of records by applying additional filters).'"
This error typically occurs when your project has a large number of work items. Reduce the size of the dataset by customizing the view. Do this step before you use it in Power BI.
Q: How do I resolve the "user wasn't authorized" error?
A: You might get this error if you try to access a project that you don't have permissions to. You might also see it if Power BI doesn't recognize your credentials. To check your permissions, see Set permissions to access Analytics and Analytics views. If it's a credential issue, work with your administrator to see if they can help resolve the problem. For more information, see Power BI security, user authentication, and Troubleshooting sign-in issues for Power BI.
Note
Power BI uses Microsoft Entra ID to authenticate users who sign in to the Power BI service, and in turn, uses the Power BI sign-in credentials whenever a user attempts to access resources that require authentication. Users sign in to the Power BI service by using the email address used to establish their Power BI account. Power BI uses that sign-in email as the effective username, which is passed to resources whenever a user attempts to connect to data. The effective username is then mapped to a user principal name and resolved to the associated Windows domain account, against which authentication is applied.
Q: How do I resolve the "Access to the resource is forbidden" error?
A: You might get this error if you have access to a specific project but you don't have the View analytics permissions. Work with your project administrator to get these permissions. For more information about the security model, see Analytics security.
Q: How do I resolve the "Project 'X' doesn't exist or you don't have permissions to access it" error?
A: This error indicates that the value you entered for Project name doesn't correspond to any project. A common mistake that users make is to confuse the project name with a team name.
For example, if the URL you use is https://dev.azure.com/fabrikam-fiber-inc/Fabrikam-Fiber-Git/Device
, then Fabrikam-Fiber-Git is the project name and it should be used in the parameter. Device is the team name.