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

az login error argument --password/-p: expected one argument after upgrading to azure cli to 2.50.0-1~focal #26815

Closed
cabral1888 opened this issue Jul 4, 2023 · 2 comments
Assignees
Labels
Account az login/account Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@cabral1888
Copy link

Describe the bug

When running the command from CI in the previous version 2.49.0-1~focal it did work:

az login \
  --service-principal \
  --tenant $AZURE_SP_TENANT \
  -u $AZURE_SP \
  -p $AZURE_SP_PASSWORD

However, since my CI installs the Azure CLI for every new execution (it always gets the latest version), now I'm using the version 2.50.0-1~focal and I'm getting the error:

argument --password/-p: expected one argument

Examples from AI knowledge base:
...

Is that an error I'm getting? Or have the API changed?

Could anyone help me with it? I really appreciate!

Related command

az login \ --service-principal \ --tenant $AZURE_SP_TENANT \ -u $AZURE_SP \ -p $AZURE_SP_PASSWORD

Errors

argument --password/-p: expected one argument

Issue script & Debug output

Since it's running from a CI perspective, I cannot run the command using different flags

Expected behavior

I would expect a JSON with all the subscriptions I'm logged in:

 [{
    "cloudName": "AzureCloud",
    "homeTenantId": "*",
    "id": "*",
    "isDefault": true,
    "managedByTenants": [
      {
        "tenantId": "TENANT_ID"
      }
    ],
    "name": "SUBSCRIPTION_1_NAME",
    "state": "Enabled",
    "tenantId": "*",
    "user": {
      "name": "*",
      "type": "servicePrincipal"
    }
  },{..}, ... ]

Environment Summary

Since it's running from a CI perspective, I cannot run the command using different flags

Additional context

No response

@cabral1888 cabral1888 added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jul 4, 2023
@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Account az login/account labels Jul 4, 2023
@ghost ghost assigned jiasli Jul 4, 2023
@ghost ghost added this to the Backlog milestone Jul 4, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Jul 4, 2023

Thank you for opening this issue, we will look into it.

@ghost ghost added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 4, 2023
@cabral1888
Copy link
Author

Hey team, nevermid. Just discovered the environment variable for password was not defined.

@cabral1888 cabral1888 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants