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 Automate / sql Patch function per...
Power Automate
Answered

sql Patch function permissions

(0) ShareShare
ReportReport
Posted on by 105

Hi, I have created an app that takes some data from Azure SQL and then make something and send it back to Azure SQL.

 

A user was set up to create the connection to Azure SQL with permissions to ALTER, DELETE, EXECUTE, INSERT, REFERENCES, SELECT and UPDATE the tables under a certain schema. 

 

I have connected my app to Azure SQL using that user and it can retrieve the data easily but when I use the function Patch an exception is thrown saying that there is a poblem in the server "An error in the server occurred". Checking what is being sent to SQL everything seems right and when I changed the connection to another table I have full access, the Patch function works.

 

I am wondering if I am missing some more permissions my user should have. Which are the permissions Patch function needs to be executed in Azure SQL?

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

    Hi @serastpan,

     

    Could you please share more details about the error message?

    Could you please share a bit more about the Patch function within your PowerApps app?

     

    I have made a test on my side and don't have the issue that you mentioned. The Patch function works well within my PowerApps app. Please consider check if there is a Primary key defined in your SQL table. If you want to create new records or update records in your SQL table using PowerApps, a Primary key is required within the SQL table.

     

    In addition, you could also take a try to add new records into your SQL table using SubmitForm fucntion, then check the if the issue still exists.

     

    Please check and see if the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/General-Discussion/Collect-Patch-functions-do-not-allow-me-to-use-my-SQL-table-as/td-p/93547

     

    More details about Known issues and Limitations of SQL Server connector, please check the following article:

    Known Isuues and Limitations of SQL Server connector

     

     

    Best regards,

    Kris

  • serastpan Profile Picture
    105 on at

    Hi @v-xida-msft

     

    My issue is that the exception is not clear at all, it just says "An error occurred on the server.".

     

    Let me explain me better. I built an app that was uploading some data to a table in SQL. The connection to SQL is created through a user that has the permissions I mentioned earlier. When I tried to upload the data, I got that exception. The table has a primary key set up.

     

    I tried then changing the connection to another table to whom the user was a db owner and the data was uploaded successfully (exactly same table with same columns, columns types and primary keys).

     

    I am wondering now which are the permissions I am missing in the first connection (through the user that can ALTER, DELETE, EXECUTE, INSERT, REFERENCES, SELECT and UPDATE) so that I can send the data. It is clear that if the user is a db owner then it can send the data without any issues.

     

    So I am wondering, which are the permissions a user needs to upload data to sql through the Patch function?

  • Verified answer
    serastpan Profile Picture
    105 on at

    Ok, it seems there was something wrong in the connection. I dropped the connection and recreated it and now it's working properly. Though it said "An error occurred in the server.", the error was actually due to the connection to SQL.

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 307 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 269 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 115 Super User 2026 Season 1

Last 30 days Overall leaderboard