cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Impactful Individual
Impactful Individual

How to pull list of all office 365 users list in PowerApps?

I need to pull all office 365 users globally...

I know Power Apps only read up to 2000 items, I want to use a collection for all users globally.

 

I tried this:

Filter(UsersOffice365.SearchUser(); Not(Blank()))

 

1 ACCEPTED SOLUTION

Accepted Solutions

Yup, this is what I have:

Office365Users.SearchUserV2(
    {
        searchTerm: Self.SearchText,
        top: 1000
    }
).value

So unless your search text is such that it returns more than 1000 records, this should work. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

View solution in original post

13 REPLIES 13
PowerAddict
Super User
Super User

Hi @Gorilla_8 ,

Just to make sure I am understanding this, you want to connect all Office365Users into a collection? 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Gorilla_8
Impactful Individual
Impactful Individual

@PowerAddict 

Yes! I Wanna get all the data of Office365Users

What happens when you do this?

ClearCollect(
    colUsers,
    Office365Users.SearchUserV2().value
)

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Gorilla_8
Impactful Individual
Impactful Individual

@PowerAddict 

.value is not avaliable

PowerAddict
Super User
Super User

Then you are probably using the SearchUser function. Try using the SearchUserV2 function. I think it gives 1000 records by default. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Gorilla_8
Impactful Individual
Impactful Individual

@PowerAddict 

 

With SearchUserV2  worked thanks, but I need more than 1000, I need all users...

PowerAddict
Super User
Super User

Can you please state your exact use case? I am curious to know why you would need more than 1000 users. If its a searchable combo box, you can always enter the search criteria in this formula to reduce the number of users that meet the criteria.

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Gorilla_8
Impactful Individual
Impactful Individual

@PowerAddict 

 

Exactly what I need, I'm going to use a combobox to pull all users, but when I search for the user, it doesn't appear due to the limitation of 1000 users.

 

 

So when he selects the user the email will come in another field to use in Power Automate

PowerAddict
Super User
Super User

What is the Items property of your combo box?

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,923)