I am trying to call a stored procedure from the Azure logic app but I am getting below error,
"body": {
"status": 403,
"message": "The EXECUTE permission was denied on the object 'MyProcName', database 'dbName', schema 'dbo'.\r\nclientRequestId:id,
"error": {
"message": "The EXECUTE permission was denied on the object 'MyProcName', database 'dbName', schema 'dbo'."
},
"source": "sql-wus2.azconn-wus2.p.azurewebsites.net"
but I can execute it from SSMS.
what is going wrong here?
Do I need to get execute permission for logic app resource group or subscription which I am using for the logic app?
Thanks in advance!
CodePudding user response:
That error means, the user you are connecting to the DB with does not have appropriate permissions, in this case the EXECUTE permission.
If it's from a logic app, you must be connecting via either:
- An Azure AD user OR A database user
Check your connection string you will know; does it have username and password etc?
In either case EXECUTE permission needs to be given to the user.
GRANT Execute ON [dbName].MyProcName TO [the-user-trying-connect-to-the-db]