web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Return AD Properties f...
Power Automate
Unanswered

Return AD Properties filter by OfficeLocation

(0) ShareShare
ReportReport
Posted on by 505

I have not been able to get all the properties I need using MS Graph Explorer. Is there another way in Power Automate to only pull from a certain office location and get the displayName, Employeeid, and Manager?

I think want to put the results into an Excel sheet.

Categories:
  • VictorIvanidze Profile Picture
    13,083 on at

    Show your GRAPH request.

  • send2mark Profile Picture
    505 on at

    I found a workaround, but if you want to take a crack at the graph explorer request here it is. https://graph.microsoft.com/v1.0/users?$expand=manager($levels=max;$select=id,displayName)&$select=id,displayName,employeeid&$count=true

  • Expiscornovus Profile Picture
    34,005 Most Valuable Professional on at

    Hi @send2mark,

     

    I think this is the combination of the advanced query and the $expand query parameter which makes it challenging.

     

    As far as I am aware the $expand is not allowed with advanced queries like this. See the note section in this article:

    https://learn.microsoft.com/en-us/graph/aad-advanced-queries?tabs=http

     

    Without the $expand it should be possible to retrieve users from a specific officeLocation:

    https://graph.microsoft.com/v1.0/users?$filter=officeLocation eq 'Scranton'&$select=id,DisplayName&$count=true

     

    Don't forget the ConsistencyLevel header with the eventual value.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 288 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard