Giter Club home page Giter Club logo

Comments (2)

mark-abrams avatar mark-abrams commented on July 30, 2024 1

Hi @rodolfoortiz , thank you for posting this issue.

When developing Standard Logic Apps, the usual approach is to configure the authentication type for each Managed API Connection in the connections.json file to Raw or ActiveDirectoryOAuth. This allows the connections to correctly authenticate with Azure when the workflow is run locally. The ManagedServiceIdentity auth type is only used when the workflows are deployed to an Azure environment, since the Logic App can then use its own managed identity to authenticate with the Managed API Connector's token store. This is described in the Microsoft documentation. And this is why you are seeing this error being raised by the Logi App workflow engine:

Workflow 'xxxxx' validation and creation failed. Error: 'The API connection reference name 'xxxx' has invalid authentication type 'ManagedServiceIdentity'. Only 'Raw' or 'ActiveDirectoryOAuth' authentication type is allowed in local developer environment.'

I'm interested to understand why you are running Logic apps locally with the authentication type set to ManagedServiceIdentity? Does this even work when you run the workflow locally?

The LogicAppUnit testing framework assumes that the authentication type in the connections.json file is set to a valid value, either Raw or ActiveDirectoryOAuth. Running a workflow via a unit test still runs the workflow in the Logic App workflow engine and so you will see these validation errors if the authentication type is not set to a valid value.

from testingframework.

rodolfoortiz avatar rodolfoortiz commented on July 30, 2024

You are correct, I'm setting the authentication type to ManagedServiceIdentity because the logic app is being deployed to Azure. I could programmatically change the authentication type to Raw in the file connections.json when the unit test runs, but then I would need to revert the changes when the unit test completes. An alternative would be to default the authentication type to Raw so that the unit tests can run correctly, but then in my Azure pipeline I would need to modify connections.json so that authentication type is updated to ManagedServiceIdentity. I consider these very messy solutions.

An easier path is for me (probably not the correct one) is for the LogicAppUnit framework to always reset the Authentication Type to a valid value so the unit test can run correctly.

from testingframework.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.