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

Fix a couple bugs in AzurePowerShellCredential #41254

Closed
wants to merge 6 commits into from

Conversation

billwert
Copy link
Contributor

@billwert billwert commented Jul 23, 2024

Newer versions of Az.Accounts have a warning about an upcoming change to Get-AzAccessToken. This breaks the existing parsing. In addition, there's a breaking change coming to Get-AzAccessToken which will make the Token field a SecureString. So a few fixes:

  1. Suppress warnings on the command we get JSON from. We'll still fail for real errors.
  2. Start passing -AsSecureString to Get-AzAccessToken (and unpack it for our use.)
  3. I noticed in a previous PR I got the order of Windows arguments wrong and probably broke this credential on Windows. Fixing that.

Fixes #41234

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@billwert
Copy link
Contributor Author

/azp run azure - identity - tests

Copy link

No pipelines are associated with this pull request.

@billwert
Copy link
Contributor Author

/azp run java - identity

Copy link

Azure Pipelines failed to run 1 pipeline(s).

@billwert billwert closed this Jul 24, 2024
@billwert billwert reopened this Jul 24, 2024
@billwert
Copy link
Contributor Author

/azp run java - identity

Copy link

Azure Pipelines failed to run 1 pipeline(s).

@billwert billwert closed this Jul 24, 2024
@joshfree
Copy link
Member

I noticed in a previous PR I got the order of Windows arguments wrong and probably broke this credential on Windows. Fixing that.

Sounds like a good smoke test to add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

AzurePowerShellCredential fails to generate token due to deprecation message in Az 12.1.0
3 participants