cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thanke
Level: Powered On

Rate limit is exceeded using Office365Users.UserProfile when trying to pull 2 fields only

I am trying to pull back user profile data using the

 

             O365Users.UserProfile(TextInput1.Text).Mail 

 

I can run it one time and get the correct results, but when I try ot rerun it a second time, I get a "statuscode 429  message Rate lImit is exceeded.  Try again in  X seconds".  Once I wait for up to 120 seconds I can run it again.  I have seen similar post, but no resolution.  Can you give me some insight on this limit...what triggers it...and how I can get around it?

 

Thanks,

Todd

 

4 REPLIES 4
Highlighted
Community Support Team
Community Support Team

Re: Rate limit is exceeded using Office365Users.UserProfile when trying to pull 2 fields only

Hi thanke,

 

I am not able to reproduce this issue on my side.


For a test, I create the connection to Office 365 Users, add a Text input control and a Label control, set the Label control’s Text property= Office365Users.UserProfile(TextInput1.Text).Mail.


Then run the app. I enter different email addresses several times in the Text input control, but I don’t get the error message even I try to return it a third time.


Are you combining the Userprofile function with other functions? If yes, please provide more details on it.


I will try to reproduce this issue on my side.


If possible, please provide your Session ID for a further investigation.

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thanke
Level: Powered On

Re: Rate limit is exceeded using Office365Users.UserProfile when trying to pull 2 fields only

No, I am not trying to pull in any other functions.  The session ID i get is "2c9d8fd7-7dd8-569b-37a3-926d575d193a".

 

All I'm trying to do is create an Employee Look-up app where I have the user enter an email and then have the app display their name, photo, and phone number.

 

I'm connecting to O365Users an then using the following functions

 

O365UserProfile(textInput.text).Displayname

O365UserPhoto(office365Users.UserProfile(textInput.text).id)

O365UserProfile(textInput.text).phone

 

The first and sometimes the second search works, but then I start getting the

 

Office365Users.UserProfile failed: ("statusCode"=429","message". Rate limit is exceeded. Try again in xx seconds)

 

Not sure why.  

 

Thanks,

Todd

 

 

Thanks,

 

Todd

 

Power Apps Staff cherie
Power Apps Staff

Re: Rate limit is exceeded using Office365Users.UserProfile when trying to pull 2 fields only

Can you try only run it if the textInput.text is not blank?

 

Example:

 

If(IsBlank(textINput.text), "", O365UserProfile(textInput.text).Displayname)

Power Apps Staff sarafankit
Power Apps Staff

Re: Rate limit is exceeded using Office365Users.UserProfile when trying to pull 2 fields only

The issue you are running into is that too many calls are going out from your app to the Office365Users connector and you are hitting the limits on it.

 

My suggestion will be to reduce the number of calls being made in the app, I will do something like:

  • Provide the text box and Search Icon besides it
  • I will set the OnSelect property of the SearchIcon to 
    Set(userProfile,Office365Users.UserProfile(textInput.Text))
     which will cache the user details in the userProfile variable
  • Then I will show all the details for the user using the userProfile variable rather than make a server call for each detail needed
  • This reduces calls as the user is typing and also the calls as we show data for multiple details of the user

Another suggestion, have you tried looking at the Org Browser template?

image.png

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,994)