I'm trying to automatically deploy an azure logic app with a managed connector to MS To Do. The resourcegroup, the logic app itself and the api connection are deployed via Azure devops and to this point everything is working fine. I also wrote some Javascript Code for retrieving an access token for the api connection, but I'm failing at calling the REST API for the updating the API connection. I looked up the MS documentation and was able to do the GET request for the resource, but the documentation for updating a resource is utter crap and I just don't get how to do it.
https://docs.microsoft.com/en-us/rest/api/resources/resources
I think the URI is right, because like mentioned above, the GET request is working. Here's how it looks:
PATCH/PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/O365I-Deployment-Test/providers/microsoft.web/connections/to-do?api-version=2015-08-01-preview
I just don't know what the body of the request should look like to update the api connection's access token.
I know there is a powershell script out there that can establish the connection, but I would prefer to do it this way.