Skip to main content
Community site session details

Community site session details

Session Id : 45sD9De3YSaeBxYQiXpaMp
Power Apps - Building Power Apps
Answered

Populate a dropdown with all O365 values

Like (0) ShareShare
ReportReport
Posted on 3 Apr 2023 14:40:26 by 2

I am trying to place a dropdown on a PA that will contain all possible Office Locations from our O365 users. I have the following currently: Sort(Distinct(Office365Users.SearchUser({searchTerm:DataCardValue10.SearchText}).OfficeLocation,OfficeLocation),Value,SortOrder.Ascending)

 

And that does work to return some values, it is only pulling the office locations from the first 100 users, as I now know functions only return 100 rows. So what can I do to return a full list of every office location that is assigned to a user in O365?

And to add, if I want to append in a value to the returned results like "Not Applicable" how would I do that?

  • Verified answer
    v-bofeng-msft Profile Picture
    on 04 Apr 2023 at 02:56:52
    Re: Populate a dropdown with all O365 values

    Hi @Wegmans ,

     

    If there are less than 999 users in your org you could try:

    Sort(Distinct(Office365Users.SearchUser({searchTerm:DataCardValue10.SearchText,top:999}).OfficeLocation,OfficeLocation),Value,SortOrder.Ascending)

     

    If there are more than 999 users in your org you could try this solution:

    Solved: GET ALL USER FORM OFFICE 365 - Power Platform Community (microsoft.com)

     

    Best Regards,

    Bof

  • Wegmans Profile Picture
    2 on 03 Apr 2023 at 15:51:34
    Re: Populate a dropdown with all O365 values

    I want it to pull from all O365 users, not just one group. Is there a Group ID that includes all users?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 03 Apr 2023 at 15:49:15
    Re: Populate a dropdown with all O365 values

    @Wegmans 

    Bing sez

    Set the OnStart property of App to following: ClearCollect (MemberCollection, Office365Groups.ListGroupMembers ("Specific Group ID").value) Add a Timer control in your app (in same screen as your Dropdown box), set the Duration property to following: 1000 set the AutoStart and Repeat property of the Timer control to following: true

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Loading complete