web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / 502 Bad Gateway on Sha...
Power Apps
Answered

502 Bad Gateway on SharePoint form

(1) ShareShare
ReportReport
Posted on by

Hi all,

 

Since a couple of days (3-4 days), I'm having trouble getting a certain PowerApps SharePoint form to work.

It's giving me an error on the datasource itself, being "An error occurred on the server":

Also, if I open the developers toolbar in IE or chrome I get a lot of 502 bad gateway errors, all pointing to https://europe-001.azure-apim.net/apim/sharepointonline/shared-sharepointonl-***.
On other lists, I don't have this problem.

 

The error on the people field 'Leidinggevende' was resolved, because apparently the people field has a new control incl. picture etc. So I just removed the former control and readded a new datacard.

This however didn't resolve the form error 😞

 

So far I've:

  • Contacted Microsoft via service request: no response in 2 days (usually someone answers in a couple of hours, now, I don't know what's going on)
  • Saved the list on which the form is based as a template and recreated it in another tenant => same problem here
  • Created a new custom list and edited the SharePoint form in PowerApps: ok
  • Created a new custom list, added similar types of fields (date, multiline, choice, people) to the list and edited the SharePoint form in PowerApps: ok (=so no problem with the types of fields)
  • Restored a version of the form from a couple of days ago => doesn't work
  • Created a standalone PowerApps app, based on this list: same problem
  • Added a new datasource to the form, reconnected the SharePoint Integration-component to the new datasource => same problem

Does anyone else have this problem?

 

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    This issue was resolved by Microsoft support and the underlying problem was we hit the throttling limit of PowerApps, although it wasn't that obvious!

    The problem was that, apart from a couple of listcolumns we also had 9 workflowstatus columns on that list. Those were coming from SharePoint Designer workflows.

    As you may or may not know: every time you publish a new version of a workflow, and you have items running a previous version of that workflow, SharePoint adds a new workflowstatus column for the new version.

    These fields also count towards the throttling limit apparently! Same goes for people fields.

     

    So in our case, we had 9 workflowstatus columns, with 1 extra column for a new version, 1 additional people field and the default 2 people fields (=created by and modified by). This caused the PowerApps form to cross the 12 field limit on 'special lookup' columns threshold.

    By deleting the duplicate workflowstatus field, the form started working again!

     

    For anyone wanting to remove those pesky workflowstatus fields, here is the PowerShell code to do so:

    Import-Module SharePointPnPPowerShellOnline -DisableNameChecking;
    $secpasswd = ConvertTo-SecureString "password" -AsPlainText -Force;
    $cred = New-Object System.Management.Automation.PSCredential ("username", $secpasswd);
    
    $company = "tenantName"
    $url = "https://$company.sharepoint.com/sites/SiteName";
    
    # PnP
    Connect-PnPOnline -Url $url -Credentials $cred;
    
    Set-PnPField -Identity "MyFieldTitle" -List "ListName" -Values @{Hidden=$false;ReadOnlyField=$false}
    Remove-PnPField -Identity "MyFieldTitle" -List "ListName"

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 321

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 311 Super User 2025 Season 2

Last 30 days Overall leaderboard