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?
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
I want it to pull from all O365 users, not just one group. Is there a Group ID that includes all users?
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