turbot / steampipe-mod-azure-insights

View dashboards and reports across all of your Azure subscriptions using Powerpipe and Steampipe.
https://hub.powerpipe.io/mods/turbot/azure_insights
Apache License 2.0
10 stars 2 forks source link

"Invoking Azure CLI failed with the following error: (SQLSTATE HV000)" #98

Closed anandvamsi closed 1 year ago

anandvamsi commented 1 year ago

Team-

I'm running steampipe version v0.19.4 with azure and azuread plugin I see i'm able to pull data from few of the azure tables where as few not; Im getting an error saying "Invoking Azure CLI failed with the following error: (SQLSTATE HV000)" I have observed same error in "azure dashboard insights" as well as while generating CIS1.5 benchmark report.

Please find my reference aws.spc and azuread.spc in the config dir

azure.spc connection "azure_sub_1" { plugin = "azure" tenant_id = "f31f568b-1232323wdwdrefdsf" subscription_id = "1264246d4-bdfdfdfdfd6a2" client_id = "8fe6259a7dfdfdfdf" client_secret = "6c338Q~D-af9WUB3pgwdfewst4wtt2_Hami" } azuread.spc connection "azure_sub_11" { plugin = "azuread" tenant_id = "f31f568b-1232323wdwdrefdsf" client_id = "8fe6259a7dfdfdfdf" client_secret = "6c338Q~D-af9WUB3pgwdfewst4wtt2_Hami" }

Help is appreciated

Describe the bug A clear and concise description of what the bug is.

Steampipe version (steampipe -v) Example: v0.3.0

Plugin version (steampipe plugin list) Example: v0.5.0

To reproduce Steps to reproduce the behavior (please include relevant code and/or commands).

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

cbruno10 commented 1 year ago

Hi @anandvamsi , I believe we're already talking in a Steampipe Slack thread, but based on the latest tests, can you please run through the following debugging steps:

Some of those commands are for the Azure Compliance mod, but I believe you had that mod downloaded as well.

FYI, that error message usually comes when we've tried to use all available authentication methods, fallback to the Azure CLI creds, and then receive an error while trying to use their creds.

Thanks!

anandvamsi commented 1 year ago

Hi Team-

Please find the output

select * from azure_subscription; :: Not getting results

Invoking Azure CLI failed with the following error: ERROR: Please run 'az login' to setup account

steampipe -v

Steampipe v0.19.4

steampipe plugin list +------------------------------------------------+---------+-------------------+ Installed Plugin Version Connections
+------------------------------------------------+---------+-------------------+ @.*** 0.99.0 aws
@.*** 0.40.1
azure_sub_1,azure
@.*** 0.9.0 azure_sub_11
@.*** 0.35.0 gcp,gcp_cloud
@.*** 0.4.0 grafana
@.*** 0.21.0 oci_new,oci

+------------------------------------------------+---------+-------------------+

steampipe check control.cis_v130_9_9

env | grep -E 'AZURE|STEAMPIPE'

@.*** ~]$

steampipe check benchmark.nist_sp_800_53_rev_5_au_6_5

All of them same error

ERROR: Invoking Azure CLI failed with the following error: ERROR: Please run 'az login' to setup account. (SQLSTATE HV000)

On Thu, Apr 13, 2023 at 12:12 AM cbruno10 @.***> wrote:

Hi @anandvamsi https://github.com/anandvamsi , I believe we're already talking in a Steampipe Slack thread, but based on the latest tests, can you please run through the following debugging steps:

  • Can you please share the Steampipe CLI version (steampipe -v) and plugin versions (steampipe plugin list)?
  • Can you please share the output when you run steampipe check control.cis_v130_9_9?
  • Can you please share the results of running the query select * from azure_subscription (do not include azure_sub_1 in the query)?
  • Do any other benchmarks run? For instance, steampipe check benchmark.nist_sp_800_53_rev_5_au_6_5?
  • Do you have any Steampipe or Azure env vars set (env | grep -E 'AZURE|STEAMPIPE') ?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/turbot/steampipe-mod-azure-insights/issues/98#issuecomment-1505755787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP7HNNK5DAZRX2GP6ILHI3XA3ZPXANCNFSM6AAAAAAW3DOXLY . You are receiving this because you were mentioned.Message ID: @.***>

cbruno10 commented 1 year ago

@anandvamsi As per the Slack thread, it seems this issue is resolved as you mentioned there was a conflict with the info in your ~/.steampipe/config/default.spc. If you're still having issues though, feel free to reopen!