Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - Missing subscription ID. Please specify a subscription ID or login to Azure CLI #155

Open
chaoscreater opened this issue Jun 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@chaoscreater
Copy link

chaoscreater commented Jun 1, 2024

Hi, I think I have a similar issue to this:
#120

The command I'm trying to run is this:
azure-cost detectAnomalies --dimension ResourceId --recent-activity-days 4

or simply this:
azure-cost

Here's the error:

System.ArgumentException: Missing subscription ID. Please specify a subscription ID or login to Azure CLI.
   System.ComponentModel.Win32Exception: An error occurred trying to start process 'az' with working directory 'D:\'. The system cannot find the file specified.
     at bool System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
     at string AzureCostCli.Infrastructure.AzCommand.GetDefaultAzureSubscriptionId() in /home/runner/work/azure-cost-cli/azure-cost-cli/src/Infrastructure/AzCommand.cs:22
     at async Task<int> AzureCostCli.Commands.DetectAnomaly.DetectAnomalyCommand.ExecuteAsync(CommandContext context, DetectAnomalySettings settings) in
        /home/runner/work/azure-cost-cli/azure-cost-cli/src/Commands/DetectAnomaly/DetectAnomaly.cs:72

I'm already logged in with AZ CLI. And if I do this, it sort of works:
azure-cost detectAnomalies --dimension ResourceId --recent-activity-days 4 -s xxxxxxxxx-xxxxx-44e9-ae35-dc5694aabfa7

But the output I get is just "Detected Anomalies" and nothing out is shown. If I run just this:

azure-cost -s xxxxxxxxx-xxxxx-44e9-ae35-dc5694aabfa7

Then I get some basic data shown.

I'm running this in Powershell 7.4.0 and I literally just installed azure-cost today.

Also, I have the latest AZ CLI x64 installed and I'm running Windows 11 build 22631 if it helps.

Copy link

welcome bot commented Jun 1, 2024

Thanks for opening your first issue! Reports like these help improve the project!

@mivano
Copy link
Owner

mivano commented Jun 2, 2024

Thanks for the detailed report. I will have a look at this.

@mivano mivano added the bug Something isn't working label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants