Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

MyProfile. Server return a HTTP error with code 0

The most simple screen, just a textbox. Text :  'Office365-gebruikers'.MyProfile().UserPrincipalName.

This generates the errors mentioned in the subject.

Not applicable

Hi @kruismanp,


I used to this error a lot. I figured out that it was coming from the Office 365 network taking too long to respond or not responding at all to the PowerApps call. 


To overcome this in my apps I try to use as little calls as possible to Office 365. What I do is whenever a user opens PowerApps I would gather his Office 365 information in a collection and use it through the app. This would call only once and reduce the probability of failing greatly.


To implement it on the main screen (the screen which opens first when users open the app) I put this function in the OnVisible property:



After anywhere in your App you can always use First(UserProfileCollection).Email, First(UserProfileCollection).DisplayName, etc..


What the function does it first checks if the collection already exists if it does it will not pull the information from Office 365 network again. 


Using this I never get the Server return a HTTP error with code 0 error. Before I used to have up to 20 calls to Office365Users in one screen and the Office365 network would just not return all of them.


Hope it helps.


Thanks for the response. We are aware of making less calls as possible. In this case it is one myprofile call that is treated as a variable and used filtering collections. 



Whitout any changes to the app, the before mentioned error that continued for hours is now absent. The profile response is swift.. 


Hi kruismanp,


I am very glad to hear that it is working for you now. I also tried this function on my side, it works as expected.


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.

Helpful resources

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 (5,334)