Update auth lib to latest#29505
Draft
isra-fel wants to merge 4 commits intoAzure:mainfrom
Draft
Conversation
…tiple projects Assumption: transitive dependency, not referenced directly by code, OK to be provided by Az.Accounts at runtime
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
scottaddie
reviewed
May 5, 2026
| @@ -22,10 +22,12 @@ namespace Microsoft.Azure.PowerShell.Authenticators.Factories | |||
| { | |||
| public class AzureCredentialFactory | |||
| { | |||
| #pragma warning disable CS0618 // ManagedIdentityCredential(string) is obsolete; suppressed pending migration to ManagedIdentityId API | |||
| public virtual TokenCredential CreateManagedIdentityCredential(string clientId) | |||
| { | |||
| return new ManagedIdentityCredential(clientId); | |||
Member
There was a problem hiding this comment.
To avoid more testing down the road, switch to the replacement overload for user-assigned managed identity with client ID. Then you can remove the warning suppression for this method.
Suggested change
| return new ManagedIdentityCredential(clientId); | |
| return new ManagedIdentityCredential(ManagedIdentityId.FromUserAssignedClientId(clientId)); |
scottaddie
reviewed
May 5, 2026
| @@ -56,8 +56,10 @@ public async Task UserAssignedMSI() | |||
|
|
|||
| var mockAzureCredentialFactory = new Mock<AzureCredentialFactory>(); | |||
| //id must be equal to accountId | |||
| #pragma warning disable CS0618 // ManagedIdentityCredential(string) is obsolete; suppressed pending migration | |||
| mockAzureCredentialFactory.Setup(f => f.CreateManagedIdentityCredential(It.Is<string>(id => id == accountId))) | |||
| .Returns(new ManagedIdentityCredential(accountId)); | |||
Member
There was a problem hiding this comment.
See my other comment about using the replacement overload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.