Skip to content

Workaround for the token cache issue in Az.Accounts 2.1.0 #13362

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

Merged
merged 4 commits into from
Nov 3, 2020

Conversation

dineshreddy007
Copy link
Contributor

@dineshreddy007 dineshreddy007 commented Oct 29, 2020

Description

TokenCache.ReadItems() is not working in latest version 2.1.0 of Az.Accounts. As a workaround using AuthFactory.Authenticate() instead of TokenCache.ReadItems().

Checklist

  • [ Yes] I have read the Submitting Changes section of CONTRIBUTING.md
  • [Yes ] The title of the PR is clear and informative
  • [ Yes] The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • [Yes ] The PR does not introduce breaking changes
  • [Yes ] If applicable, the changes made in the PR have proper test coverage
  • [ NotApplicable] For public API changes to cmdlets:
    • [NotApplicable ] a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • [NotApplicable] the markdown help files have been regenerated using the commands listed here

@ghost ghost added the customer-reported label Oct 29, 2020
@ghost
Copy link

ghost commented Oct 29, 2020

Thank you for your contribution dineshreddy007! We will review the pull request and get back to you soon.

@isra-fel
Copy link
Member

/azp run azure-powershell - powershell-core

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@isra-fel
Copy link
Member

/azp run azure-powershell - security-tools

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@dineshreddy007
Copy link
Contributor Author

Will send a new iteration with a different workaround as per Yeming's suggestion.

Using AuthFactory.Authenticate instead of TokenCache
@isra-fel
Copy link
Member

isra-fel commented Nov 2, 2020

/azp run azure-powershell - security-tools

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@isra-fel
Copy link
Member

isra-fel commented Nov 2, 2020

/azp run azure-powershell - windows-powershell

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

They'll be updated automatically during release process
Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dineshreddy007 versions are calculated automatically during release process, so I've reverted psd1 and AssemblyInfo.cs.

Have you tested the new work-around? Is it ready for a release?

@isra-fel isra-fel self-assigned this Nov 2, 2020
@dineshreddy007
Copy link
Contributor Author

Hi @isra-fel i have tested the workaround and it is ready for release.

@dineshreddy007
Copy link
Contributor Author

Hi @dineshreddy007 versions are calculated automatically during release process, so I've reverted psd1 and AssemblyInfo.cs.

Have you tested the new work-around? Is it ready for a release?

I have tested the workaround and it is ready for release.

@isra-fel
Copy link
Member

isra-fel commented Nov 3, 2020

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@isra-fel isra-fel merged commit 555a4bc into master Nov 3, 2020
@isra-fel isra-fel deleted the user/digot/azaccountsversionfix branch May 26, 2021 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants