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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Getting the list of al...
Power Apps
Unanswered

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
    153,026 Most Valuable Professional on at

    @Adrian_Celis ,

    No - Distinct() is not Delegable

  • Community Power Platform Member Profile Picture
    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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard