Comments (4)
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.
@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.
@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.
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)
- Poweroff VM HOT 2
- SSL Error some time HOT 11
- Customize UserAgent for metrics HOT 1
- API version incompatible. HOT 3
- delete_vmss_vms fails on instanceId HOT 3
- Error generating container instance group with environment variables HOT 1
- Get Azure VM Metrics data using Insights rest. HOT 3
- delete all resource in resource group but not the resource group HOT 1
- get_access_token_from_cli does not work in Azure Cloud Shell HOT 1
- Add more "requests" params
- list_vms_sub returns a maximum of 50 results HOT 4
- how to use it in Azure China HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azurerm.