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 / How to check if User e...
Power Apps
Answered

How to check if User exists through Office365Users with mail or initials? 1000+ users

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

I'm trying to create a function with Office365Users.SearchUserV2, where i get a true or false value when i type either initials or the mail of a user into a textinput.
So basically the function checks if a user with those initials exists or not.

I have tried using this function: IsBlank(LookUp(Office365Users.SearchUserV2().value, Mail = TextInput.Text).Mail)

But It cannot return more than 1000 users, which makes the function useless for my need. 

So if anybody knows how i get it to return more than 1000 users, than it would really help.

Thanks in advance! 🙂

Categories:
  • Silvester. Akakpo Profile Picture
    783 on at

    Kindly go to your app setting and raise the limit from 2000. 
    Click file (top left corner) > App settings > Advanced settings > set value for non-delegable queries

    Hope this helps!

     

     

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Do you want to get more than 1000 users using the Office365Users.SearchUserV2() function?

     

    Actually, Office365Users.SearchUserV2() could only return 999 users at max, which is a limit of Office365 connector. To set the row limit to 2000 is useless.

     

    I did a sample for you.

    1\ Add a button control and set its onselect property to:

    Clear(Col);Set(varNextlink,Blank());Set(varNextlinkTemp,Blank());Set(varSkiptoken,"");With(Office365Users.SearchUserV2({searchTerm:""}),Collect(Col,ThisRecord.value);Set(varNextlink,ThisRecord.'@odata.nextLink');Set(varSkiptoken,Mid(varNextlink,Find("skipToken",varNextlink)+10)));Set(varNextlinkTemp,varNextlink)

    2\ Add a toggle control and set its Default property to:

    If(varNextlinkTemp=Blank(),true,varNextlinkTemp=varNextlink,false,true)

    Set the toggle's OnCheck property to:

    Set(varNextlinkTemp,varNextlink)

    Set the toggle's OnUncheck property to:

    If(varNextlink=Blank()&&varNextlinkTemp=Blank(),Blank(),With(Office365Users.SearchUserV2({searchTerm:"",skipToken:varSkiptoken}),Collect(Col,ThisRecord.value);Set(varSkiptoken,Mid(ThisRecord.'@odata.nextLink',Find("skipToken",ThisRecord.'@odata.nextLink')+10));Set(varNextlink,ThisRecord.'@odata.nextLink')))

    Set the toggle's visible property to:

    false
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-qiaqi-msft,

    Thank you for your answer, I think your code is on another level than me, so im a littel confused on how i should add the inputbox + Mail = TextInput.Text).Mail, so the searchTerm can see where i type the initials 🙂

    Thanks again!
    Mabn

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @Anonymous,

    Emm, the solution I posted will return all the users in your group, and you could lookup the textinput text within.

    IsBlank(LookUp(AllUsers, TextInput.Text in Mail).Mail)

    If you want to search user based on the initial strings, I think you could only use the in operator, which causes the delegation issue and could not retrieve in a collection including more than 2000 records.

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-qiaqi-msft 

    Ah i see 🙂

    Thanks for your answer, it makes sense now. 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard