Skip to content

Commit

Permalink
[Az.Accounts] Fixed incorrect access token (#18414)
Browse files Browse the repository at this point in the history
* fixed incorrect access token

* fix
  • Loading branch information
VeryEarly authored Jun 21, 2022
1 parent 5303cde commit ece5974
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Accounts/Accounts/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
-->

## Upcoming Release
* Fixed incorrect access token [#18105]
* Supported exporting and importing configurations by `Export-AzConfig` and `Import-AzConfig`.
* Upgraded version of Microsoft.Identity.Client for .NET Framework [#18495]
* Fixed an issue that Az.Accounts failed to be imported if multiple environment variables, which only differ by case, are set. [#18304]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ private string GetEndpointToken(IAzureAccount account, string targetEndpoint)
{
tokenKey = AzureAccount.Property.KeyVaultAccessToken;
}
if (string.Equals(targetEndpoint, AzureEnvironment.ExtendedEndpoint.MicrosoftGraphEndpointResourceId, StringComparison.OrdinalIgnoreCase))
if (string.Equals(targetEndpoint, AzureEnvironment.ExtendedEndpoint.MicrosoftGraphEndpointResourceId, StringComparison.OrdinalIgnoreCase) || string.Equals(targetEndpoint, AzureEnvironment.ExtendedEndpoint.MicrosoftGraphUrl, StringComparison.OrdinalIgnoreCase))
{
tokenKey = Constants.MicrosoftGraphAccessToken;
}
Expand Down

0 comments on commit ece5974

Please sign in to comment.