Hello Power Apps Community,
I'm encountering a perplexing issue with a Power Apps canvas app that utilizes a PCF (PowerApps Component Framework) to save data to an SQL database using a SQL connector. The PCF is designed to use setValue and save functions to commit data changes. When the app is in edit mode, everything functions correctly, and data is saved to the SQL database as expected. However, when I publish the app and play it directly, I receive a 403 Forbidden error during the save operation.
Here are some specifics about the setup and the issue:
- The PCF is designed to work with SQL Server data via a SQL connector.
- Data saving works flawlessly within the app's edit mode.
- The issue arises only when the app is played after publishing — at this point, the setValue and save functions trigger a 403 Forbidden error.
- I have confirmed that I possess a premium Power Apps license.
- To isolate the issue, I used the same SQL connector with a Patch function elsewhere in the app, and data is saved without any errors, which suggests that the connector and my permissions are configured correctly.
- The main goal is to ensure data can be saved to the SQL database from the PCF in both edit and play modes without encountering 403 errors.
I'm looking for insights or solutions from anyone who might have faced a similar issue or understands the intricacies of PCF data operations within Power Apps.
Here's the error message I'm getting:
POST https://unitedstates-002.azure-apim.net/invoke 403 (Forbidden)
Error: {code: 403, message: "Method patch is not allowed for table [dbo].[CostGrid_Project]"}It's perplexing because this only happens in play mode, not in edit mode, and my Patch function works without issue. I've checked my app's settings and permissions and everything seems to be in order.
Has anyone encountered this or a similar issue? Any guidance on how to resolve this would be greatly appreciated.
Thank you in advance for your help and support!