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

Announcements

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:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,079 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
    33,480 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard