Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renew Connection Keys When Debugging Locally #4984

Closed
aschwenker-insight opened this issue Jun 14, 2024 · 1 comment · Fixed by #4982
Closed

Renew Connection Keys When Debugging Locally #4984

aschwenker-insight opened this issue Jun 14, 2024 · 1 comment · Fixed by #4982

Comments

@aschwenker-insight
Copy link

aschwenker-insight commented Jun 14, 2024

Describe the Bug with repro steps

To work with Logic Apps (Standard) both locally from Visual Studio Code and from Azure, the Managed API Connections need to be parameterized because Managed API Connections require an access token when running locally while using managed identity when running in Azure.

When you first configure a Managed API Connection in the Logic Apps (Standard) Designer in Visual Studio Code, the extension adds a Managed API Connection to connections.json and stores the access token for that Connection in local.settings.json. If you modify an existing Connection on an Action an access token is recreated. This access token is valid for 7 days.

Currently, the only way to renew that access token using the Logic Apps (Standard) extension is to tweak the Managed API Connection for an Action from the Designer. This causes the extension to renew the access token, but the access token is not renewed when the Logic App is debugged locally or when a Workflow using the Managed API Connection is saved.

The Logic Apps (Standard) extension should be checking and renewing the access token if it has expired when a Workflow is opened or saved in the Designer or when the Workflow is run from the Visual Studio Code debugger.

The workaround I have been using is a PowerShell script that runs during debugging to use the Azure CLI to POST to the listConnectionKeys REST endpoint for each Managed API Connection's ID. The ID is built from the parameterized Managed API Connection in connections.json, paramters.json, and local.settings.json.

It would be great if this functionality were built into the Logic Apps (Standard) extension.

What type of Logic App Is this happening in?

Standard (VSCode)

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

No response

Screenshots or Videos

No response

Browser

Not really applicable from VSCode, but I use Edge

Additional context

This issue occurs with any Managed API Connection because of the difference in how Managed API Connections are used locally versus in Azure. It is not unique to any particular Managed API Connection type.

@wsilveiranz
Copy link
Contributor

Hi @aschwenker-insight,

This feature is under development. Will update once it is available in the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants