microsoft / ARI

Azure Resource Inventory - It's a Powerful tool to create EXCEL inventory from Azure Resources with low effort
MIT License
1.12k stars 397 forks source link

Error running ARI #192

Closed eriwol closed 5 months ago

eriwol commented 5 months ago

Hi, Updated to v 3.1.16 and start having problems. First few runs opened Edge browser for sign-in, then errors with: "code": "ResponsePayLoadTooLarge"

Next attempts of running ARI doesn't open Edge but a non-responsive login box.

Any ideas what's wrong? or something I should update?

Claudio-Merola commented 5 months ago

Hi @eriwol

that's odd, can you run the script adding the -Debug parameter and posting the output messages before and after the error?

Thanks

eriwol commented 5 months ago

Hi, thank you: This worked flawlessly until today, perhaps updating some modules caused this? I will also try running the script from another server today if I get the time. image

image

image

Finishes with login box open wihich is unresponsive: image

Claudio-Merola commented 5 months ago

Hi @eriwol

That's interesting. What parameters are you using? -IncludeTags or -ResourceGroups?

Did you download the full repository or just the main script?

Thanks

eriwol commented 5 months ago

Hi, Just the main script with these parameters: .\AzureResourceInventory.ps1 -TenantID xxxxxx -Online -ReportDir "C:\AzureResourceInventory-report\NCA" -SecurityCenter -DiagramFullEnvironment -IncludeTags

Tried a new setup on a new server 2022 with same behaviour: First run: image

Second run: image

Could it be some az cli modules has changed or is it my setup?

sbirdi commented 5 months ago

I'm experiencing the same error message with it prompting with az login and pops up with a dialog window to select the relevant Azure account to use, it then hangs at this point. It seems to work by authenticating with the -DeviceLogin option.

Claudio-Merola commented 5 months ago

Hi @eriwol

az cli changed the way it authenticate (by providing a pop-up windows)

I have updated the az cli to be in the exact same version you have, but I'm not having this issue:

image

I have also used the exact same parameters.

One thing I noticed is that your authentication prompt does not have the accounts cached:

image

As @sbirdi mentioned, can you try using the -DeviceAuthentication ?

eriwol commented 5 months ago

Should this be on the commandline like this or in the ARI script itself? Tried the below but with same error. .\AzureResourceInventory.ps1 -TenantID xxxxx -DeviceAuthentication -Online -ReportDir "C:\AzureResourceInventory-report" -Diagram -IncludeTags

image

Claudio-Merola commented 5 months ago

@eriwol

Its a parameter: "-DeviceLogin"

run like that:

.\AzureResourceInventory.ps1 -TenantID xxxxx -DeviceLogin -Online -ReportDir "C:\AzureResourceInventory-report" -Diagram -IncludeTags

It will ask you to authenticate in a different manner.

eriwol commented 5 months ago

See above, that's what I tried 😊, made no difference for me.

Claudio-Merola commented 5 months ago

but you write "-DeviceAuthentication" in the command line not "-DeviceLogin" 😄

eriwol commented 5 months ago

Oh no sorry, how did I manage that?, 🙃 Will try again with the correct parameter this time (and clean my glasses)

eriwol commented 5 months ago

Worked perfectly! Keep up the good work, this is an awesome tool 😊