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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
NargisseB
Regular Visitor

Expand Columns / Retrieve columns from Azure using Microsoft Graph API

Hello, I used Microsoft Graph API to extract users information from Azure and I'm trying to get the column AccountEnabled ( I can see the column when I export the users informations into a csv )
I used this code to get the users, but when I try to expand the columns I can't see in the expand list the column I want, I also can't see other information like the usertype ( It's directly shown in Azure ) and many others. When I try to write it manually the columns are empty. I also tried to use $select but it didnt work. 

 

let
    token = GetMSGraphToken(),

    InitialUrl = "https://graph.microsoft.com/v1.0/users",

    Source = Json.Document(Web.Contents(InitialUrl, [Headers=[Authorization="Bearer " & token]])),
    
    #"Transform to table" = Table.FromList(Source[value], Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    
    #"Expand Columns" = Table.ExpandRecordColumn(#"Transform to table" , "Column1", {"id", "displayName", "accountEnabled"}, 
    {"id", "displayName", "accountEnabled"})
in
    #"Expand Colums"

 

The only columns I can see / expand directly are :  Select Columns.PNG

 

Thanks in advance for the help.

 

1 REPLY 1
lbendlin
Super User
Super User

Have you tried using OData.Feed instead of Web.Contents?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.