Coder Social home page Coder Social logo

How to run from powershell about azqr HOT 9 CLOSED

red-erik avatar red-erik commented on June 22, 2024
How to run from powershell

from azqr.

Comments (9)

red-erik avatar red-erik commented on June 22, 2024 1

Hello,
it seems to be working now.
I'll keep you posted.

Regards,
Red.

from azqr.

cmendible avatar cmendible commented on June 22, 2024

Either you have the following env variables set to a non empty value:

  • AZURE_CLIENT_ID
  • AZURE_CLIENT_SECRET
  • AZURE_TENANT_ID

Or you are running azqr from a Virtual Machine with a Managed Identity.

Since version 0.50.0 you can force azqr to use de Azure CLI credentials by using the -f flag.

Hope it helps.

from azqr.

red-erik avatar red-erik commented on June 22, 2024

Hello,
I'm trying with powershell from my Desktop after using AZ login but I'm not able to have ir working any way.
The -f parameter does not give any different result.
Do I really need to set some system wide variables ? From documentation it seems to fully support Azure CLI

Regards,
Red.

P.S. I'm running it from a standard powershell without admin privileges (PowerShell-7.4.1-win-x64)

from azqr.

cmendible avatar cmendible commented on June 22, 2024

azqr uses DefaultAzureCredential and the way it works is outlined here: https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication?tabs=bash#2-authenticate-with-azure

Basically it attempts the following credentials in order:

Can you share the result of executing: azqr -v

With the -f flag azqr no longer uses DefaultAzureCredential and forces the use of AzureCLICredential so I would expect a different error message if any.

if !forceAzureCliCredential {

from azqr.

red-erik avatar red-erik commented on June 22, 2024

Hello,
this is what I see

image

Regards,
Red.

from azqr.

cmendible avatar cmendible commented on June 22, 2024

the f flag is for the scan command.

Please run: azqr scan -f

from azqr.

red-erik avatar red-erik commented on June 22, 2024

./azqr scan --mask=false -f -s xxxxxx-xxxxxx-xxxxxx-xxxxxxx
2024-02-16T12:58:36+01:00 FTL Failed to list Resource Groups error="DefaultAzureCredential: failed to acquire a token.\nAttempted credentials:\n\tEnvironmentCredential: missing environment variable AZURE_TENANT_ID\n\tWorkloadIdentityCredential: no client ID specified. Check pod configuration or set ClientID in the options\n\tManagedIdentityCredential: ManagedIdentityCredential: failed to retreive secret key from the identity endpoint: could not read file (C:\ProgramData\AzureConnectedMachineAgent\Tokens\

from azqr.

cmendible avatar cmendible commented on June 22, 2024

Sorry about that! Just found a bug when reading the value of the -f flag I'll release a new version shortly.

from azqr.

cmendible avatar cmendible commented on June 22, 2024

Please download version 0.52.0 from here: https://github.com/Azure/azqr/releases/tag/v.0.52.0 and run azqr scan with the -f flag.

from azqr.

Related Issues (20)

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.