I created a Stored Procedure in my CosmosDb database to delete a number of files in the collection based on a property. The structure of the database looks like this:
Database Test
| - Collection
| - Documents
| - Stored Procedures
| - CleanupByProperty
I then created a Logic App, that executes this Stored Procedure. I connected via the Portal to the Cosmos database, using the Read/Write Primary Key. When creating the connector in the Logic App, it couldn't read the collections from my database server, giving the following error:
Could not retrieve values. The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used.
If I manually filled in the fields for Collection ID
and Sproc ID
, and ran the Logic App, it returned Unauthorized
on the action.
What am I doing wrong here?