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 Apps / Getting the list of al...
Power Apps
Answered

Getting the list of all available departments in Office 365

(0) ShareShare
ReportReport
Posted on by 1,652 Moderator

Hi All,

 

I am using this formula to get the list of departments in the active directory. This works for tenants with few users, but the problem is that we have more than 10k users and the Office365Users function can only retrieve up to 999 users, I believe. Is there a workaround for this?

 

Distinct(
 Filter(
 Office365Users.SearchUser(),
 Len(Department) > 0
 ),
 Department
)

 

 @WarrenBelz this is a follow up to the previous post that I asked.

 

Thanks

Adrian

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,833 Most Valuable Professional on at

    @Adrian_Celis ,

    No - Distinct() is not Delegable

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Adrian_Celis. I've hit the exact same problem, where the non-delegable nature of Distinct() is preventing me from producing a complete department list. Do you mind me asking if you found a way around it in the end, please?

  • Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @Anonymous 

    Sorry. Haven't found a way using this method.

     

    Ended up using another data source for our active directory.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 556

#2
WarrenBelz Profile Picture

WarrenBelz 412 Most Valuable Professional

#3
Haque Profile Picture

Haque 296

Last 30 days Overall leaderboard