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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
KervBruce
Advocate I
Advocate I

Export list of ADO users to Power BI

How can I get a list of ADO users, along with their email addresses, from Azure DevOps to Power BI?

I am using Analytics Views to query work items and although this includes various people columns such as 'created by' and 'assigned to', it is just names and does not include the email address.  I want the address to be able to distinguish which organisation a team member is from.  I don't really want to create and maintain a separate manual table with the overhead and risk of human error typos that brings.

Many thanks

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @KervBruce 

 

Connecting using Analytics Views doesn't support that. You can connect using Advanced functions VSTS.AccountContents and query ADO REST APIs to get user email accounts. 

 

First query Teams - Get All Teams - REST API to get the team id and project id you want to query from. You may need to modify the last step to get the team data you want. 

let
    // Teams - Get All Teams
    // GET https://dev.azure.com/{organization}/_apis/teams?api-version=7.1-preview.3
    // This query is to get the team id and project id
    Source = VSTS.AccountContents("https://dev.azure.com/xxxxxxxxxxx/_apis/teams?api-version=7.1-preview.3"),
    #"Imported JSON" = Json.Document(Source,65001),
    value = #"Imported JSON"[value],
    #"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    Column1 = #"Converted to Table"{0}[Column1]
in
    Column1

vjingzhang_0-1662360343203.png

 

Then query Teams - Get Team Members With Extended Properties - REST API to get team members' display name, id and uniqueName (email account) from the team. 

let
    // Teams - Get Team Members With Extended Properties
    // GET https://dev.azure.com/{organization}/_apis/projects/{projectId}/teams/{teamId}/members?api-version=7.1-preview.2
    
    Source = VSTS.AccountContents("https://dev.azure.com/xxxx/_apis/projects/xxxxxxxxxxx/teams/yyyyyyyyyyyyyyyy/members?api-version=7.1-preview.2"),
    #"Imported JSON" = Json.Document(Source,65001),
    value = #"Imported JSON"[value],
    #"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"identity"}, {"identity"}),
    #"Expanded identity" = Table.ExpandRecordColumn(#"Expanded Column1", "identity", {"displayName", "id", "uniqueName"}, {"displayName", "id", "uniqueName"})
in
    #"Expanded identity"

vjingzhang_1-1662361022339.png

 

Hope this helps. 

 

Reference: Connect using Power Query & Azure DevOps functions - Azure DevOps | Microsoft Docs

 

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

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @KervBruce 

 

Connecting using Analytics Views doesn't support that. You can connect using Advanced functions VSTS.AccountContents and query ADO REST APIs to get user email accounts. 

 

First query Teams - Get All Teams - REST API to get the team id and project id you want to query from. You may need to modify the last step to get the team data you want. 

let
    // Teams - Get All Teams
    // GET https://dev.azure.com/{organization}/_apis/teams?api-version=7.1-preview.3
    // This query is to get the team id and project id
    Source = VSTS.AccountContents("https://dev.azure.com/xxxxxxxxxxx/_apis/teams?api-version=7.1-preview.3"),
    #"Imported JSON" = Json.Document(Source,65001),
    value = #"Imported JSON"[value],
    #"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    Column1 = #"Converted to Table"{0}[Column1]
in
    Column1

vjingzhang_0-1662360343203.png

 

Then query Teams - Get Team Members With Extended Properties - REST API to get team members' display name, id and uniqueName (email account) from the team. 

let
    // Teams - Get Team Members With Extended Properties
    // GET https://dev.azure.com/{organization}/_apis/projects/{projectId}/teams/{teamId}/members?api-version=7.1-preview.2
    
    Source = VSTS.AccountContents("https://dev.azure.com/xxxx/_apis/projects/xxxxxxxxxxx/teams/yyyyyyyyyyyyyyyy/members?api-version=7.1-preview.2"),
    #"Imported JSON" = Json.Document(Source,65001),
    value = #"Imported JSON"[value],
    #"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"identity"}, {"identity"}),
    #"Expanded identity" = Table.ExpandRecordColumn(#"Expanded Column1", "identity", {"displayName", "id", "uniqueName"}, {"displayName", "id", "uniqueName"})
in
    #"Expanded identity"

vjingzhang_1-1662361022339.png

 

Hope this helps. 

 

Reference: Connect using Power Query & Azure DevOps functions - Azure DevOps | Microsoft Docs

 

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

Thank you @v-jingzhang That's really helpful and just what I needed.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors