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 Pages / Getting server returne...
Power Pages
Unanswered

Getting server returned an http error with code 500

(0) ShareShare
ReportReport
Posted on by 100

Hello All!
I have one API which I integrated with PowerApps application. So what's happening whenever I am running API through application, it is creating resource group and Vm in Azure. 

Here the problem is first time when I am calling API in any Powerapps application, it working fine. But when I am running it second time, it is giving me an error - "Getting server returned an http error with code 500"

 

Screenshot 2020-12-03 120559.png

 

I followed this link, but got what to do, as it is referring  to power automate - https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-handle-a-Server-Error-500-from-calling-web-API-via-Flow/m-p/173054/highlight/true#M57749

 

Can someone please help me wit this?

Thanks in advance!!

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Saurabh-704 :

    Firstly, considering that it worked normally before, I suggest you delete this formula and add it again, the error should be eliminated.(Or you can consider resetting the app to the previous version)

    Seconldy,based on the information you currently provide, I can’t determine what caused the error.

    The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

    This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response. 

    Finally,the solution in the link you provided is not to solve the 500 error, but to go to another branch when an error occurs (return to the default value).

    If this problem continues to occur, I suggest you create a support ticket.

    Best Regards,

    Bof

  • Saurabh-704 Profile Picture
    100 on at

    Thank you @v-bofeng-msft for your reply. Actually I have one version only. The thing is when I am running that API by clicking on button first time through application, its working fine. When I run second time through same application, It is giving that error. Dont know why?!

     

    I have created 3-4 sample application by for testing, first time that API is working fine, but from second time its giving an error. 

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @Saurabh-704 , 

     

     Here is my analysis on this. 

     

    1. Looks like on your first call it does created the resource group and VM on the first instance. 

    2. When you call the API again I believe it is passing the same parameter to create the step 1 again. Try changing this to dynamic parameter and see how it works. 

    3. Also in Azure check whether you any CORS policy available. If so then you need to enable the CORS strictly as you are calling API from PowerAPPS. 

     

    But my hunch is you are trying to create the same resource again or there should be a waiting time until your first API call response has return success. 

     

    Hope it helps in you some way . 

     

    ------------

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hey @Saurabh-704 , 

     

     Did my analysis helped you in some way. If so kindly update the thread and if it is successful please mark my solution as answers. So that other users can get benefit from the thread. 

     

    Thanks 

  • Saurabh-704 Profile Picture
    100 on at

    Hey @ragavanrajan Sorry for the late update. Actually the thing is I was passing parameter dynamically only. And I think it was not related to CORS policy, because if it would be related to CORS policy then at first place only it would not allow us to created VM through API in PowerApps.

    As per now, when I debug and did some RnD and testing, I was getting error related to quota issue. Like for example per location can have limited no of VM's or resources only. So I thinks thats the reason but then also not sure!
    Thank you once again!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 65

#2
11manish Profile Picture

11manish 55

#3
Vish WR Profile Picture

Vish WR 29

Last 30 days Overall leaderboard