question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Azure login action does not function if the client secret starts with hyphen

See original GitHub issue

If the Azure creds clientSecret starts with hyphen the Azure login action will fail with the following error:

Error: : argument --password/-p: expected one argument

It seems that the clientSecret is passed to az login using -p and not using -p= which is needed according to az login documentation if the clientSecret starts with a hyphen.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:24

github_iconTop GitHub Comments

3reactions
BALAGA-GAYATRIcommented, Jun 22, 2022

In order to get unblocked with this scenario please use Azure/cli@v1 action and provide az login <arguments> command in the input. Make sure to follow this while using the command there. Since a workaround is provided here, closing this issue.

2reactions
fredrklcommented, Sep 20, 2022

IMHO: a bit odd to close this issue as it is a bug. Maybe update the documentation with this workaround?

Read more comments on GitHub >

github_iconTop Results From Across the Web

`az login -u <username> -p <password>` does not work if ...
When attempting to log in and specifying the -p parameter, the CLI is unable to parse the password argument if it starts with...
Read more >
Common error codes for Azure Key Vault | Microsoft Learn
VaultNameNotValid, The vault name should be string of 3 to 24 characters and can contain only numbers (0-9), letters (a-z, A-Z), and hyphens...
Read more >
Azure Login in GitHub Actions - YouTube
Learn how to authenticate to Azure from a GitHub Action by creating a Service Principal and then using the Azure CLI in your...
Read more >
Getting started with GitHub Actions and Azure Login - YouTube
Want to find out more about how GitHub Actions work ? How about the Azure Actions that you might use in your first...
Read more >
AZ cli add secret to key vault that starts with a hyphen
Updating the answer : Can you try with a "=" in front of the original value. This az keyvault secret set --name my-secret...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found