Giter Club home page Giter Club logo

Comments (4)

gbowerman avatar gbowerman commented on August 11, 2024

Thanks @nickraptis. When you have a service principal, why don't you call get_access_token()? Is it to make the Python code more portable? E.g. re-use the same code in any CLI environment without needing any additional config files? That makes sense. Please go ahead a submit a PR for this.

from azurerm.

nickraptis avatar nickraptis commented on August 11, 2024

@gbowerman Our use case is that we are using azurerm alongside azure-cli in a cicd pipeline.
azure-cli is already logged in as a principal, so we didn't want to lug the principal credentials around if we didn't needed to.

I had overlooked the documentation's suggestion to use az account get-access-token.
This did take some work to update to a version offering it, but ended up being the right choice, so I don't think an enhancement is needed after all.
Other than considering catching the mentioned Exception, or more prominence in the documentation, I'm happy with closing the issue :)

from azurerm.

gbowerman avatar gbowerman commented on August 11, 2024

@nickraptis thanks the use case makes sense. I'll leave this open in case anyone wants to take on implementing it, or catching the exception and returning a meaningful message.

from azurerm.

gbowerman avatar gbowerman commented on August 11, 2024

BTW a recent change improved get_access_token_from_cli() so it works in Azure cloud shell (getting token from MSI endpoint). May not be useful in your case, but adding it to this issue as an FYI.

from azurerm.

Related Issues (13)

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.