When I execute the following stored procedure through Power Automate, nothing is returned, but if I copy and execute the same query that was sent to the server (using Profiler to capture it) the Id is returned.
(The procedure name and parameter names have been altered for the example, but the code is otherwise identical).
ALTER PROC [APP].[GetRecordId]
@GUID uniqueidentifier = null,
@RecordId int OUTPUT
AS
SET NOCOUNT ON;
SELECT TOP 1 @RecordId = Id
FROM APP.SpecialTable
WHERE RecordGUID = @GUID;
RETURN;
GO
{
"ResultSets": {},
"ReturnCode": 0,
"OutputParameters": {}
}
I’ve tried executing the same query using an Execute A SQL Query (V2) using a SELECT tested in Azure Data Studio, executing the same SPROC, and verified that the account used has the right access privileges.
A different stored procedure that INSERTS new records consistently returns the Inserted.Id using a similar OUTPUT parameter so I’m not sure why these fail.
6